Ignore:
Timestamp:
Jul 23, 2008, 3:15:16 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Geoff Garen.

JSClassRef is created context-free, but gets infatuated with the first context it sees.

The implicit API contract is that JSClassRef can be used with any context on any thread.
This no longer worked, because UStrings in the class were turned into per-context
identifiers, and the cached JSObject prototype was tied to JSGlobalData, too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSObjectRef.cpp

    r35196 r35293  
    7575        return toRef(new (exec) JSObject(exec->lexicalGlobalObject()->objectPrototype())); // slightly more efficient
    7676
    77     JSValue* jsPrototype = jsClass->prototype(ctx);
     77    JSValue* jsPrototype = jsClass->prototype(exec);
    7878    if (!jsPrototype)
    7979        jsPrototype = exec->lexicalGlobalObject()->objectPrototype();
     
    100100
    101101    JSValue* jsPrototype = jsClass
    102         ? jsClass->prototype(ctx)
     102        ? jsClass->prototype(exec)
    103103        : exec->dynamicGlobalObject()->objectPrototype();
    104104   
Note: See TracChangeset for help on using the changeset viewer.