Changeset 44016 in webkit


Ignore:
Timestamp:
May 21, 2009 5:28:22 PM (15 years ago)
Author:
oliver@apple.com
Message:

<rdar://problem/6910264> REGRESSION: Cached DOM global object property access fails in browser (25921)
<https://bugs.webkit.org/show_bug.cgi?id=25921>

Reviewed by Maciej Stachowiak.

When caching properties on the global object we need to ensure that we're
not attempting to cache through a shell object.

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r44014 r44016  
     12009-05-21  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        <rdar://problem/6910264> REGRESSION: Cached DOM global object property access fails in browser (25921)
     6        <https://bugs.webkit.org/show_bug.cgi?id=25921>
     7
     8        When caching properties on the global object we need to ensure that we're
     9        not attempting to cache through a shell object.
     10
     11        * interpreter/Interpreter.cpp:
     12        (JSC::Interpreter::resolveGlobal):
     13        * jit/JITStubs.cpp:
     14        (JSC::JITStubs::cti_op_resolve_global):
     15
    1162009-05-21  Steve Falkenburg  <sfalken@apple.com>
    217
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r43839 r44016  
    172172    if (globalObject->getPropertySlot(callFrame, ident, slot)) {
    173173        JSValue result = slot.getValue(callFrame, ident);
    174         if (slot.isCacheable() && !globalObject->structure()->isDictionary()) {
     174        if (slot.isCacheable() && !globalObject->structure()->isDictionary() && slot.slotBase() == globalObject) {
    175175            if (vPC[4].u.structure)
    176176                vPC[4].u.structure->deref();
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r43854 r44016  
    17341734    if (globalObject->getPropertySlot(callFrame, ident, slot)) {
    17351735        JSValue result = slot.getValue(callFrame, ident);
    1736         if (slot.isCacheable() && !globalObject->structure()->isDictionary()) {
     1736        if (slot.isCacheable() && !globalObject->structure()->isDictionary() && slot.slotBase() == globalObject) {
    17371737            GlobalResolveInfo& globalResolveInfo = callFrame->codeBlock()->globalResolveInfo(globalResolveInfoIndex);
    17381738            if (globalResolveInfo.structure)
  • trunk/LayoutTests/ChangeLog

    r44010 r44016  
     12009-05-21  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Add tests to ensure that we correctly cache (or do not cache) lookups
     6        of global properties.
     7
     8        * fast/js/global-function-resolve.html: Added.
     9        * fast/js/resources/global-function-resolve.js: Added.
     10
    1112009-05-21  Geoffrey Garen  <ggaren@apple.com>
    212
Note: See TracChangeset for help on using the changeset viewer.