Ignore:
Timestamp:
Sep 26, 2012, 6:18:40 PM (13 years ago)
Author:
[email protected]
Message:

Proxy the global this in JSC
https://bugs.webkit.org/show_bug.cgi?id=97734

Reviewed by Filip Pizlo.

Eeep – fix a bug - was leaving the global this proxy's structure's globalObject as 0,
and setting the proxy's prototype as the global object, rather than its prototype.

  • jsc.cpp:

(GlobalObject::create):

  • runtime/JSProxy.h:

(JSC::JSProxy::createStructure):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r129711 r129719  
    178178        GlobalObject* object = new (NotNull, allocateCell<GlobalObject>(globalData.heap)) GlobalObject(globalData, structure);
    179179        object->finishCreation(globalData, arguments);
    180         object->setGlobalThis(globalData, JSProxy::create(globalData, JSProxy::createStructure(globalData, object), object));
     180        object->setGlobalThis(globalData, JSProxy::create(globalData, JSProxy::createStructure(globalData, object, object->prototype()), object));
    181181        return object;
    182182    }
Note: See TracChangeset for help on using the changeset viewer.