Changeset 94701 in webkit


Ignore:
Timestamp:
Sep 7, 2011 12:40:41 PM (13 years ago)
Author:
oliver@apple.com
Message:

Remove JSObjectWithGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=67689

Reviewed by Geoff Garen.

../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:

Remove JSObjectWithGlobalObject, and update code to stop using anonymous
storage to access the global object that a JSObject comes from. Largely
mechanical change to remove the use of anonymous storage and JSObjectWithGlobalObject.

  • API/JSCallbackConstructor.cpp:

(JSC::JSCallbackConstructor::JSCallbackConstructor):
(JSC::JSCallbackConstructor::finishCreation):

  • API/JSCallbackConstructor.h:
  • API/JSCallbackObject.cpp:
  • API/JSCallbackObject.h:

(JSC::JSCallbackObject::create):

  • API/JSCallbackObjectFunctions.h:

(JSC::::JSCallbackObject):
(JSC::::finishCreation):
(JSC::::staticFunctionGetter):

  • API/JSClassRef.cpp:

(OpaqueJSClass::prototype):

  • API/JSObjectRef.cpp:

(JSObjectMake):
(JSObjectGetPrivate):
(JSObjectSetPrivate):
(JSObjectGetPrivateProperty):
(JSObjectSetPrivateProperty):
(JSObjectDeletePrivateProperty):

  • API/JSValueRef.cpp:

(JSValueIsObjectOfClass):

(JSC::DFG::dfgRepatchGetMethodFast):
(JSC::DFG::tryCacheGetMethod):

  • jit/JIT.h:
  • jit/JITInlineMethods.h:

(JSC::JIT::emitAllocateJSFunction):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::patchMethodCallProto):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • runtime/DatePrototype.cpp:
  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::InternalFunction):
(JSC::InternalFunction::finishCreation):

  • runtime/InternalFunction.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::JSFunction):
(JSC::JSFunction::finishCreation):

  • runtime/JSFunction.h:

(JSC::JSFunction::create):
(JSC::JSFunction::createStructure):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::reset):

  • runtime/JSONObject.cpp:

(JSC::JSONObject::JSONObject):
(JSC::JSONObject::finishCreation):

  • runtime/JSONObject.h:
  • runtime/JSObject.h:

(JSC::JSObject::globalObject):

  • runtime/JSObjectWithGlobalObject.cpp: Removed.
  • runtime/JSObjectWithGlobalObject.h: Removed.
  • runtime/JSValue.cpp:

(JSC::JSValue::isValidCallee):

  • runtime/Lookup.cpp:

(JSC::setUpStaticFunctionSlot):

  • runtime/Lookup.h:
  • runtime/MathObject.cpp:

(JSC::MathObject::MathObject):
(JSC::MathObject::finishCreation):

  • runtime/MathObject.h:
  • runtime/NumberPrototype.cpp:
  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::RegExpObject):
(JSC::RegExpObject::finishCreation):

  • runtime/RegExpObject.h:
  • runtime/Structure.cpp:

(JSC::Structure::Structure):

  • runtime/Structure.h:

(JSC::Structure::create):
(JSC::Structure::globalObject):

../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:

Remove use of anonymous storage and JSObjectWithGlobalObject for
accessing a JSObject's global object now that they're available
on the object's structure.

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):

  • bindings/js/JSDOMWrapper.h:

(WebCore::JSDOMWrapper::globalObject):
(WebCore::JSDOMWrapper::JSDOMWrapper):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bridge/objc/objc_runtime.h:
  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
(JSC::Bindings::ObjcFallbackObjectImp::finishCreation):

  • bridge/runtime_object.cpp:

(JSC::Bindings::RuntimeObject::RuntimeObject):
(JSC::Bindings::RuntimeObject::finishCreation):

  • bridge/runtime_object.h:

../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebKit2:

Remove JSObjectWithGlobalObject usage.

  • WebProcess/Plugins/Netscape/JSNPObject.cpp:

(WebKit::JSNPObject::JSNPObject):
(WebKit::JSNPObject::finishCreation):

  • WebProcess/Plugins/Netscape/JSNPObject.h:
Location:
trunk/Source
Files:
2 deleted
55 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSCallbackConstructor.cpp

    r94644 r94701  
    3737namespace JSC {
    3838
    39 const ClassInfo JSCallbackConstructor::s_info = { "CallbackConstructor", &JSObjectWithGlobalObject::s_info, 0, 0 };
     39const ClassInfo JSCallbackConstructor::s_info = { "CallbackConstructor", &JSNonFinalObject::s_info, 0, 0 };
    4040
    4141JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback)
    42     : JSObjectWithGlobalObject(globalObject, structure)
     42    : JSNonFinalObject(globalObject->globalData(), structure)
    4343    , m_class(jsClass)
    4444    , m_callback(callback)
     
    4949void JSCallbackConstructor::finishCreation(JSGlobalObject* globalObject, JSClassRef jsClass)
    5050{
    51     Base::finishCreation(globalObject->globalData(), globalObject);
     51    Base::finishCreation(globalObject->globalData());
    5252    ASSERT(inherits(&s_info));
    5353    if (m_class)
  • trunk/Source/JavaScriptCore/API/JSCallbackConstructor.h

    r94644 r94701  
    2828
    2929#include "JSObjectRef.h"
    30 #include <runtime/JSObjectWithGlobalObject.h>
     30#include <runtime/JSObject.h>
    3131
    3232namespace JSC {
    3333
    34 class JSCallbackConstructor : public JSObjectWithGlobalObject {
     34class JSCallbackConstructor : public JSNonFinalObject {
    3535public:
    36     typedef JSObjectWithGlobalObject Base;
     36    typedef JSNonFinalObject Base;
    3737
    3838    static JSCallbackConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, JSObjectCallAsConstructorCallback callback)
  • trunk/Source/JavaScriptCore/API/JSCallbackObject.cpp

    r83661 r94701  
    3333namespace JSC {
    3434
    35 ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject<JSObjectWithGlobalObject>);
     35ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject<JSNonFinalObject>);
    3636ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject<JSGlobalObject>);
    3737
    3838// Define the two types of JSCallbackObjects we support.
    39 template <> const ClassInfo JSCallbackObject<JSObjectWithGlobalObject>::s_info = { "CallbackObject", &JSObjectWithGlobalObject::s_info, 0, 0 };
     39template <> const ClassInfo JSCallbackObject<JSNonFinalObject>::s_info = { "CallbackObject", &JSNonFinalObject::s_info, 0, 0 };
    4040template <> const ClassInfo JSCallbackObject<JSGlobalObject>::s_info = { "CallbackGlobalObject", &JSGlobalObject::s_info, 0, 0 };
    4141
  • trunk/Source/JavaScriptCore/API/JSCallbackObject.h

    r94599 r94701  
    118118class JSCallbackObject : public Parent {
    119119protected:
    120     JSCallbackObject(ExecState*, JSGlobalObject*, Structure*, JSClassRef, void* data);
     120    JSCallbackObject(ExecState*, Structure*, JSClassRef, void* data);
    121121    JSCallbackObject(JSGlobalData&, JSClassRef, Structure*);
    122122    // We'd like to use the placement version of operator new defined in JSCell, but
     
    125125    void* operator new(size_t, void* ptr) { return ptr; }
    126126
    127     void finishCreation(ExecState*, JSGlobalObject*);
     127    void finishCreation(ExecState*);
    128128    void finishCreation();
    129129
     
    133133    static JSCallbackObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, void* data)
    134134    {
    135         JSCallbackObject* callbackObject = new (allocateCell<JSCallbackObject>(*exec->heap())) JSCallbackObject(exec, globalObject, structure, classRef, data);
     135        ASSERT(!structure->globalObject() || structure->globalObject() == globalObject);
     136        JSCallbackObject* callbackObject = new (allocateCell<JSCallbackObject>(*exec->heap())) JSCallbackObject(exec, structure, classRef, data);
    136137        return callbackObject;
    137138    }
  • trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r94364 r94701  
    5151
    5252template <class Parent>
    53 JSCallbackObject<Parent>::JSCallbackObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, void* data)
    54     : Parent(globalObject, structure)
     53JSCallbackObject<Parent>::JSCallbackObject(ExecState* exec, Structure* structure, JSClassRef jsClass, void* data)
     54    : Parent(exec->globalData(), structure)
    5555    , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass)))
    5656{
    57     finishCreation(exec, globalObject);
     57    finishCreation(exec);
    5858}
    5959
     
    6969
    7070template <class Parent>
    71 void JSCallbackObject<Parent>::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
    72 {
    73     Base::finishCreation(globalObject->globalData(), globalObject);
     71void JSCallbackObject<Parent>::finishCreation(ExecState* exec)
     72{
     73    Base::finishCreation(exec->globalData());
    7474    ASSERT(Parent::inherits(&s_info));
    7575    init(exec);
     
    575575                if (JSObjectCallAsFunctionCallback callAsFunction = entry->callAsFunction) {
    576576                   
    577                     JSObject* o = JSCallbackFunction::create(exec, asGlobalObject(thisObj->getAnonymousValue(0)), callAsFunction, propertyName);
     577                    JSObject* o = JSCallbackFunction::create(exec, thisObj->globalObject(), callAsFunction, propertyName);
    578578                    thisObj->putDirect(exec->globalData(), propertyName, o, entry->attributes);
    579579                    return o;
  • trunk/Source/JavaScriptCore/API/JSClassRef.cpp

    r91194 r94701  
    252252    if (!jsClassData.cachedPrototype) {
    253253        // Recursive, but should be good enough for our purposes
    254         jsClassData.cachedPrototype.set(exec->globalData(), JSCallbackObject<JSObjectWithGlobalObject>::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), prototypeClass, &jsClassData), 0); // set jsClassData as the object's private data, so it can clear our reference on destruction
     254        jsClassData.cachedPrototype.set(exec->globalData(), JSCallbackObject<JSNonFinalObject>::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), prototypeClass, &jsClassData), 0); // set jsClassData as the object's private data, so it can clear our reference on destruction
    255255        if (parentClass) {
    256256            if (JSObject* prototype = parentClass->prototype(exec))
  • trunk/Source/JavaScriptCore/API/JSObjectRef.cpp

    r91194 r94701  
    8282        return toRef(constructEmptyObject(exec));
    8383
    84     JSCallbackObject<JSObjectWithGlobalObject>* object = JSCallbackObject<JSObjectWithGlobalObject>::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), jsClass, data);
     84    JSCallbackObject<JSNonFinalObject>* object = JSCallbackObject<JSNonFinalObject>::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), jsClass, data);
    8585    if (JSObject* prototype = jsClass->prototype(exec))
    8686        object->setPrototype(exec->globalData(), prototype);
     
    343343    if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info))
    344344        return static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->getPrivate();
    345     if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info))
    346         return static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->getPrivate();
     345    if (jsObject->inherits(&JSCallbackObject<JSNonFinalObject>::s_info))
     346        return static_cast<JSCallbackObject<JSNonFinalObject>*>(jsObject)->getPrivate();
    347347   
    348348    return 0;
     
    357357        return true;
    358358    }
    359     if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) {
    360         static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->setPrivate(data);
     359    if (jsObject->inherits(&JSCallbackObject<JSNonFinalObject>::s_info)) {
     360        static_cast<JSCallbackObject<JSNonFinalObject>*>(jsObject)->setPrivate(data);
    361361        return true;
    362362    }
     
    374374    if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info))
    375375        result = static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->getPrivateProperty(name);
    376     else if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info))
    377         result = static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->getPrivateProperty(name);
     376    else if (jsObject->inherits(&JSCallbackObject<JSNonFinalObject>::s_info))
     377        result = static_cast<JSCallbackObject<JSNonFinalObject>*>(jsObject)->getPrivateProperty(name);
    378378    return toRef(exec, result);
    379379}
     
    390390        return true;
    391391    }
    392     if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) {
    393         static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue);
     392    if (jsObject->inherits(&JSCallbackObject<JSNonFinalObject>::s_info)) {
     393        static_cast<JSCallbackObject<JSNonFinalObject>*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue);
    394394        return true;
    395395    }
     
    407407        return true;
    408408    }
    409     if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) {
    410         static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->deletePrivateProperty(name);
     409    if (jsObject->inherits(&JSCallbackObject<JSNonFinalObject>::s_info)) {
     410        static_cast<JSCallbackObject<JSNonFinalObject>*>(jsObject)->deletePrivateProperty(name);
    411411        return true;
    412412    }
  • trunk/Source/JavaScriptCore/API/JSValueRef.cpp

    r89219 r94701  
    132132        if (o->inherits(&JSCallbackObject<JSGlobalObject>::s_info))
    133133            return static_cast<JSCallbackObject<JSGlobalObject>*>(o)->inherits(jsClass);
    134         if (o->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info))
    135             return static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(o)->inherits(jsClass);
     134        if (o->inherits(&JSCallbackObject<JSNonFinalObject>::s_info))
     135            return static_cast<JSCallbackObject<JSNonFinalObject>*>(o)->inherits(jsClass);
    136136    }
    137137    return false;
  • trunk/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp

    r85117 r94701  
    5858    if (!obj)
    5959        return;
    60     ASSERT(obj->inherits(&JSCallbackObject<JSGlobalObject>::s_info) || obj->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info));
     60    ASSERT(obj->inherits(&JSCallbackObject<JSGlobalObject>::s_info) || obj->inherits(&JSCallbackObject<JSNonFinalObject>::s_info));
    6161    map->map().set(exec->globalData(), key, obj);
    6262}
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r94559 r94701  
    126126    runtime/JSNotAnObject.cpp
    127127    runtime/JSObject.cpp
    128     runtime/JSObjectWithGlobalObject.cpp
    129128    runtime/JSONObject.cpp
    130129    runtime/JSPropertyNameIterator.cpp
  • trunk/Source/JavaScriptCore/ChangeLog

    r94688 r94701  
     12011-09-06  Oliver Hunt  <oliver@apple.com>
     2
     3        Remove JSObjectWithGlobalObject
     4        https://bugs.webkit.org/show_bug.cgi?id=67689
     5
     6        Reviewed by Geoff Garen.
     7
     8        Remove JSObjectWithGlobalObject, and update code to stop using anonymous
     9        storage to access the global object that a JSObject comes from.  Largely
     10        mechanical change to remove the use of anonymous storage and JSObjectWithGlobalObject.
     11
     12        * API/JSCallbackConstructor.cpp:
     13        (JSC::JSCallbackConstructor::JSCallbackConstructor):
     14        (JSC::JSCallbackConstructor::finishCreation):
     15        * API/JSCallbackConstructor.h:
     16        * API/JSCallbackObject.cpp:
     17        * API/JSCallbackObject.h:
     18        (JSC::JSCallbackObject::create):
     19        * API/JSCallbackObjectFunctions.h:
     20        (JSC::::JSCallbackObject):
     21        (JSC::::finishCreation):
     22        (JSC::::staticFunctionGetter):
     23        * API/JSClassRef.cpp:
     24        (OpaqueJSClass::prototype):
     25        * API/JSObjectRef.cpp:
     26        (JSObjectMake):
     27        (JSObjectGetPrivate):
     28        (JSObjectSetPrivate):
     29        (JSObjectGetPrivateProperty):
     30        (JSObjectSetPrivateProperty):
     31        (JSObjectDeletePrivateProperty):
     32        * API/JSValueRef.cpp:
     33        (JSValueIsObjectOfClass):
     34        * API/JSWeakObjectMapRefPrivate.cpp:
     35        * JavaScriptCore.exp:
     36        * JavaScriptCore.xcodeproj/project.pbxproj:
     37        * bytecode/CodeBlock.h:
     38        * dfg/DFGRepatch.cpp:
     39        (JSC::DFG::dfgRepatchGetMethodFast):
     40        (JSC::DFG::tryCacheGetMethod):
     41        * jit/JIT.h:
     42        * jit/JITInlineMethods.h:
     43        (JSC::JIT::emitAllocateJSFunction):
     44        * jit/JITPropertyAccess.cpp:
     45        (JSC::JIT::patchMethodCallProto):
     46        * jit/JITStubs.cpp:
     47        (JSC::DEFINE_STUB_FUNCTION):
     48        * runtime/DatePrototype.cpp:
     49        * runtime/InternalFunction.cpp:
     50        (JSC::InternalFunction::InternalFunction):
     51        (JSC::InternalFunction::finishCreation):
     52        * runtime/InternalFunction.h:
     53        * runtime/JSFunction.cpp:
     54        (JSC::JSFunction::JSFunction):
     55        (JSC::JSFunction::finishCreation):
     56        * runtime/JSFunction.h:
     57        (JSC::JSFunction::create):
     58        (JSC::JSFunction::createStructure):
     59        * runtime/JSGlobalObject.cpp:
     60        (JSC::JSGlobalObject::reset):
     61        * runtime/JSONObject.cpp:
     62        (JSC::JSONObject::JSONObject):
     63        (JSC::JSONObject::finishCreation):
     64        * runtime/JSONObject.h:
     65        * runtime/JSObject.h:
     66        (JSC::JSObject::globalObject):
     67        * runtime/JSObjectWithGlobalObject.cpp: Removed.
     68        * runtime/JSObjectWithGlobalObject.h: Removed.
     69        * runtime/JSValue.cpp:
     70        (JSC::JSValue::isValidCallee):
     71        * runtime/Lookup.cpp:
     72        (JSC::setUpStaticFunctionSlot):
     73        * runtime/Lookup.h:
     74        * runtime/MathObject.cpp:
     75        (JSC::MathObject::MathObject):
     76        (JSC::MathObject::finishCreation):
     77        * runtime/MathObject.h:
     78        * runtime/NumberPrototype.cpp:
     79        * runtime/RegExpObject.cpp:
     80        (JSC::RegExpObject::RegExpObject):
     81        (JSC::RegExpObject::finishCreation):
     82        * runtime/RegExpObject.h:
     83        * runtime/Structure.cpp:
     84        (JSC::Structure::Structure):
     85        * runtime/Structure.h:
     86        (JSC::Structure::create):
     87        (JSC::Structure::globalObject):
     88
    1892011-09-07  Gavin Barraclough  <barraclough@apple.com>
    290
  • trunk/Source/JavaScriptCore/GNUmakefile.list.am

    r94559 r94701  
    347347        Source/JavaScriptCore/runtime/JSObject.cpp \
    348348        Source/JavaScriptCore/runtime/JSObject.h \
    349         Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.cpp \
    350         Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h \
    351349        Source/JavaScriptCore/runtime/JSONObject.cpp \
    352350        Source/JavaScriptCore/runtime/JSONObject.h \
  • trunk/Source/JavaScriptCore/JavaScriptCore.exp

    r94644 r94701  
    110110__ZN3JSC10Identifier4fromEPNS_9ExecStateEj
    111111__ZN3JSC10Identifier8toUInt32ERKNS_7UStringERb
    112 __ZN3JSC10JSFunction14finishCreationEPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_18FunctionExecutableEPNS_14ScopeChainNodeE
    113 __ZN3JSC10JSFunction14finishCreationEPNS_9ExecStateEPNS_14JSGlobalObjectEiRKNS_10IdentifierEPNS_14ExecutableBaseE
     112__ZN3JSC10JSFunction14finishCreationEPNS_9ExecStateEiRKNS_10IdentifierEPNS_14ExecutableBaseE
    114113__ZN3JSC10JSFunction4nameEPNS_9ExecStateE
    115114__ZN3JSC10JSFunction6s_infoE
     
    219218__ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
    220219__ZN3JSC24DynamicGlobalObjectScopeC1ERNS_12JSGlobalDataEPNS_14JSGlobalObjectE
    221 __ZN3JSC24JSObjectWithGlobalObject14finishCreationERNS_12JSGlobalDataEPNS_14JSGlobalObjectE
    222 __ZN3JSC24JSObjectWithGlobalObjectC2EPNS_14JSGlobalObjectEPNS_9StructureE
    223 __ZN3JSC24JSObjectWithGlobalObjectC2ERNS_12JSGlobalDataEPNS_9StructureE
    224220__ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE
    225221__ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE
     
    344340__ZN3JSC9Structure40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjPNS_6JSCellERm
    345341__ZN3JSC9Structure6s_infoE
    346 __ZN3JSC9StructureC1ERNS_12JSGlobalDataENS_7JSValueERKNS_8TypeInfoEjPKNS_9ClassInfoE
     342__ZN3JSC9StructureC1ERNS_12JSGlobalDataEPNS_14JSGlobalObjectENS_7JSValueERKNS_8TypeInfoEjPKNS_9ClassInfoE
    347343__ZN3JSC9StructureD1Ev
    348344__ZN3JSC9constructEPNS_9ExecStateENS_7JSValueENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE
  • trunk/Source/JavaScriptCore/JavaScriptCore.gypi

    r94461 r94701  
    8787            'runtime/JSLock.h',
    8888            'runtime/JSObject.h',
    89             'runtime/JSObjectWithGlobalObject.h',
    9089            'runtime/JSString.h',
    9190            'runtime/JSType.h',
     
    529528            'runtime/JSONObject.h',
    530529            'runtime/JSObject.cpp',
    531             'runtime/JSObjectWithGlobalObject.cpp',
    532530            'runtime/JSPropertyNameIterator.cpp',
    533531            'runtime/JSPropertyNameIterator.h',
  • trunk/Source/JavaScriptCore/JavaScriptCore.pro

    r94461 r94701  
    157157    runtime/JSNotAnObject.cpp \
    158158    runtime/JSObject.cpp \
    159     runtime/JSObjectWithGlobalObject.cpp \
    160159    runtime/JSONObject.cpp \
    161160    runtime/JSPropertyNameIterator.cpp \
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def

    r94644 r94701  
    1313    ??0JSFunction@JSC@@AAE@PAVExecState@1@PAVJSGlobalObject@1@PAVStructure@1@@Z
    1414    ??0JSLock@JSC@@QAE@PAVExecState@1@@Z
    15     ??0JSObjectWithGlobalObject@JSC@@IAE@PAVJSGlobalObject@1@PAVStructure@1@@Z
    16     ??0JSObjectWithGlobalObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z
    1715    ??0MD5@WTF@@QAE@XZ
    1816    ??0Mutex@WTF@@QAE@XZ
     
    2119    ??0SHA1@WTF@@QAE@XZ
    2220    ??0StringObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@PAVJSString@1@@Z
    23     ??0Structure@JSC@@AAE@AAVJSGlobalData@1@VJSValue@1@ABVTypeInfo@1@IPBUClassInfo@1@@Z
     21    ??0Structure@JSC@@AAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@VJSValue@1@ABVTypeInfo@1@IPBUClassInfo@1@@Z
    2422    ??0ThreadCondition@WTF@@QAE@XZ
    2523    ??0UString@JSC@@QAE@PBD@Z
     
    178176    ?finishCreation@JSArray@JSC@@IAEXAAVJSGlobalData@2@@Z
    179177    ?finishCreation@JSArray@JSC@@IAEXAAVJSGlobalData@2@ABVArgList@2@@Z
    180     ?finishCreation@JSFunction@JSC@@IAEXPAVExecState@2@PAVJSGlobalObject@2@HABVIdentifier@2@PAVExecutableBase@2@@Z
    181     ?finishCreation@JSObjectWithGlobalObject@JSC@@IAEXAAVJSGlobalData@2@PAVJSGlobalObject@2@@Z
     178    ?finishCreation@JSFunction@JSC@@IAEXPAVExecState@2@HABVIdentifier@2@PAVExecutableBase@2@@Z
    182179    ?focus@Profile@JSC@@QAEXPBVProfileNode@2@@Z
    183180    ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@H@Z
     
    219216    ?getter@PropertyDescriptor@JSC@@QBE?AVJSValue@2@XZ
    220217    ?globalExec@JSGlobalObject@JSC@@QAEPAVExecState@2@XZ
    221     ?globalObject@JSObjectWithGlobalObject@JSC@@QBEPAVJSGlobalObject@2@XZ
    222218    ?globalObjectCount@Heap@JSC@@QAEIXZ
    223219    ?grow@HandleHeap@JSC@@AAEXXZ
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj

    r94559 r94701  
    847847                        </File>
    848848                        <File
    849                                 RelativePath="..\..\runtime\JSObjectWithGlobalObject.cpp"
    850                                 >
    851                         </File>
    852                         <File
    853                                 RelativePath="..\..\runtime\JSObjectWithGlobalObject.h"
    854                                 >
    855                         </File>
    856                         <File
    857849                                RelativePath="..\..\runtime\JSONObject.cpp"
    858850                                >
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r94559 r94701  
    416416                A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = A76C51741182748D00715B05 /* JSInterfaceJIT.h */; };
    417417                A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */; };
    418                 A783A0D111A36DCA00563D20 /* JSObjectWithGlobalObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A783A0D011A36DCA00563D20 /* JSObjectWithGlobalObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
    419                 A783A2AB11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A783A2AA11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp */; };
    420418                A784A26111D16622005776AC /* ASTBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A7EE7411B98B8D0065A14F /* ASTBuilder.h */; };
    421419                A784A26211D16622005776AC /* JSParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7A7EE7511B98B8D0065A14F /* JSParser.cpp */; };
     
    11821180                A76C51741182748D00715B05 /* JSInterfaceJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInterfaceJIT.h; sourceTree = "<group>"; };
    11831181                A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITWriteBarrier.h; sourceTree = "<group>"; };
    1184                 A783A0D011A36DCA00563D20 /* JSObjectWithGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSObjectWithGlobalObject.h; sourceTree = "<group>"; };
    1185                 A783A2AA11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSObjectWithGlobalObject.cpp; sourceTree = "<group>"; };
    11861182                A791EF260F11E07900AE1F68 /* JSByteArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSByteArray.h; sourceTree = "<group>"; };
    11871183                A791EF270F11E07900AE1F68 /* JSByteArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSByteArray.cpp; sourceTree = "<group>"; };
     
    20352031                                BC22A3980E16E14800AF21C8 /* JSObject.cpp */,
    20362032                                BC22A3990E16E14800AF21C8 /* JSObject.h */,
    2037                                 A783A2AA11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp */,
    2038                                 A783A0D011A36DCA00563D20 /* JSObjectWithGlobalObject.h */,
    20392033                                A7F9935E0FD7325100A0B2D0 /* JSONObject.cpp */,
    20402034                                A7F9935D0FD7325100A0B2D0 /* JSONObject.h */,
     
    25192513                                BC18C4250E16F5CD00B34460 /* JSObjectRef.h in Headers */,
    25202514                                A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */,
    2521                                 A783A0D111A36DCA00563D20 /* JSObjectWithGlobalObject.h in Headers */,
    25222515                                A7F9935F0FD7325100A0B2D0 /* JSONObject.h in Headers */,
    25232516                                BC87CDB910712AD4000614CF /* JSONObject.lut.h in Headers */,
     
    31443137                                147F39D4107EC37600427A48 /* JSObject.cpp in Sources */,
    31453138                                1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */,
    3146                                 A783A2AB11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp in Sources */,
    31473139                                A7F993600FD7325100A0B2D0 /* JSONObject.cpp in Sources */,
    31483140                                A784A26211D16622005776AC /* JSParser.cpp in Sources */,
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r94559 r94701  
    157157        // We'd like this to actually be JSFunction, but InternalFunction and JSFunction
    158158        // don't have a common parent class and we allow specialisation on both
    159         JITWriteBarrier<JSObjectWithGlobalObject> cachedFunction;
     159        JITWriteBarrier<JSObject> cachedFunction;
    160160        JITWriteBarrier<JSObject> cachedPrototype;
    161161        bool seen;
  • trunk/Source/JavaScriptCore/dfg/DFGRepatch.cpp

    r94559 r94701  
    246246}
    247247
    248 static void dfgRepatchGetMethodFast(JSGlobalData* globalData, CodeBlock* codeBlock, MethodCallLinkInfo& methodInfo, JSObjectWithGlobalObject* callee, Structure* structure, JSObject* slotBaseObject)
     248static void dfgRepatchGetMethodFast(JSGlobalData* globalData, CodeBlock* codeBlock, MethodCallLinkInfo& methodInfo, JSObject* callee, Structure* structure, JSObject* slotBaseObject)
    249249{
    250250    ScriptExecutable* owner = codeBlock->ownerExecutable();
     
    275275        && specific) {
    276276       
    277         JSObjectWithGlobalObject* callee = (JSObjectWithGlobalObject*)specific;
     277        JSObject* callee = asObject(specific);
    278278       
    279279        // Since we're accessing a prototype in a loop, it's a good bet that it
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r94688 r94701  
    240240        static void patchGetByIdSelf(CodeBlock* codeblock, StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress);
    241241        static void patchPutByIdReplace(CodeBlock* codeblock, StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress, bool direct);
    242         static void patchMethodCallProto(JSGlobalData&, CodeBlock* codeblock, MethodCallLinkInfo&, JSObjectWithGlobalObject*, Structure*, JSObject*, ReturnAddressPtr);
     242        static void patchMethodCallProto(JSGlobalData&, CodeBlock* codeblock, MethodCallLinkInfo&, JSObject*, Structure*, JSObject*, ReturnAddressPtr);
    243243
    244244        static void compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, ReturnAddressPtr returnAddress)
  • trunk/Source/JavaScriptCore/jit/JITInlineMethods.h

    r94688 r94701  
    424424    storePtr(TrustedImmPtr(executable), Address(result, JSFunction::offsetOfExecutable()));
    425425
    426    
    427     // store the function's global object
    428     int globalObjectOffset = sizeof(JSValue) * JSFunction::GlobalObjectSlot;
    429     storePtr(TrustedImmPtr(m_codeBlock->globalObject()), Address(regT1, globalObjectOffset + OBJECT_OFFSETOF(JSValue, u.asBits.payload)));
    430 #if USE(JSVALUE32_64)
    431     store32(TrustedImm32(JSValue::CellTag), Address(regT1, globalObjectOffset + OBJECT_OFFSETOF(JSValue, u.asBits.tag)));
    432 #endif
    433 
    434426    // store the function's name
    435427    ASSERT(executable->nameValue());
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r93698 r94701  
    10481048}
    10491049
    1050 void JIT::patchMethodCallProto(JSGlobalData& globalData, CodeBlock* codeBlock, MethodCallLinkInfo& methodCallLinkInfo, JSObjectWithGlobalObject* callee, Structure* structure, JSObject* proto, ReturnAddressPtr returnAddress)
     1050void JIT::patchMethodCallProto(JSGlobalData& globalData, CodeBlock* codeBlock, MethodCallLinkInfo& methodCallLinkInfo, JSObject* callee, Structure* structure, JSObject* proto, ReturnAddressPtr returnAddress)
    10511051{
    10521052    RepatchBuffer repatchBuffer(codeBlock);
  • trunk/Source/JavaScriptCore/jit/JITStubs.cpp

    r94559 r94701  
    15271527        ) {
    15281528
    1529         JSObjectWithGlobalObject* callee = (JSObjectWithGlobalObject*)specific;
     1529        JSObject* callee = asObject(specific);
    15301530
    15311531        // Since we're accessing a prototype in a loop, it's a good bet that it
  • trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp

    r94644 r94701  
    2828#include "DateInstance.h"
    2929#include "Error.h"
     30#include "JSGlobalObject.h"
    3031#include "JSString.h"
    3132#include "JSStringBuilder.h"
  • trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp

    r94644 r94701  
    3535ASSERT_CLASS_FITS_IN_CELL(InternalFunction);
    3636
    37 const ClassInfo InternalFunction::s_info = { "Function", &JSObjectWithGlobalObject::s_info, 0, 0 };
     37const ClassInfo InternalFunction::s_info = { "Function", &JSNonFinalObject::s_info, 0, 0 };
    3838
    3939InternalFunction::InternalFunction(VPtrStealingHackType)
    40     : JSObjectWithGlobalObject(VPtrStealingHack)
     40    : JSNonFinalObject(VPtrStealingHack)
    4141{
    4242}
    4343
    44 InternalFunction::InternalFunction(JSGlobalData* globalData, JSGlobalObject* globalObject, Structure* structure, const Identifier& name)
    45     : JSObjectWithGlobalObject(globalObject, structure)
     44InternalFunction::InternalFunction(JSGlobalData* globalData, JSGlobalObject*, Structure* structure, const Identifier& name)
     45    : JSNonFinalObject(*globalData, structure)
    4646{
    47     finishCreation(*globalData, globalObject, name);
     47    finishCreation(*globalData, name);
    4848}
    4949
    50 void InternalFunction::finishCreation(JSGlobalData& globalData, JSGlobalObject* globalObject, const Identifier& name)
     50void InternalFunction::finishCreation(JSGlobalData& globalData, const Identifier& name)
    5151{
    52     Base::finishCreation(globalData, globalObject);
     52    Base::finishCreation(globalData);
    5353    ASSERT(inherits(&s_info));
    5454    putDirect(globalData, globalData.propertyNames->name, jsString(&globalData, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
  • trunk/Source/JavaScriptCore/runtime/InternalFunction.h

    r94644 r94701  
    2525#define InternalFunction_h
    2626
    27 #include "JSObjectWithGlobalObject.h"
     27#include "JSObject.h"
    2828#include "Identifier.h"
    2929
     
    3232    class FunctionPrototype;
    3333
    34     class InternalFunction : public JSObjectWithGlobalObject {
     34    class InternalFunction : public JSNonFinalObject {
    3535    public:
    36         typedef JSObjectWithGlobalObject Base;
     36        typedef JSNonFinalObject Base;
    3737
    3838        static JS_EXPORTDATA const ClassInfo s_info;
     
    5555        InternalFunction(JSGlobalData*, JSGlobalObject*, Structure*, const Identifier&);
    5656
    57         void finishCreation(JSGlobalData&, JSGlobalObject*, const Identifier& name);
     57        void finishCreation(JSGlobalData&, const Identifier& name);
    5858
    5959    private:
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r94364 r94701  
    6363
    6464JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
    65     : Base(globalObject, structure)
     65    : Base(exec->globalData(), structure)
    6666    , m_executable()
    6767    , m_scopeChain(exec->globalData(), this, globalObject->globalScopeChain())
     
    7070
    7171JSFunction::JSFunction(ExecState* exec, FunctionExecutable* executable, ScopeChainNode* scopeChainNode)
    72     : Base(scopeChainNode->globalObject.get(), scopeChainNode->globalObject->functionStructure())
     72    : Base(exec->globalData(), scopeChainNode->globalObject->functionStructure())
    7373    , m_executable(exec->globalData(), this, executable)
    7474    , m_scopeChain(exec->globalData(), this, scopeChainNode)
     
    7676}
    7777
    78 void JSFunction::finishCreation(ExecState* exec, JSGlobalObject* globalObject, int length, const Identifier& name, ExecutableBase* executable)
    79 {
    80     Base::finishCreation(globalObject->globalData(), globalObject);
     78void JSFunction::finishCreation(ExecState* exec, int length, const Identifier& name, ExecutableBase* executable)
     79{
     80    Base::finishCreation(exec->globalData());
    8181    ASSERT(inherits(&s_info));
    8282    m_executable.set(exec->globalData(), this, executable);
     
    8585}
    8686
    87 void JSFunction::finishCreation(ExecState* exec, JSGlobalObject* globalObject, FunctionExecutable* executable, ScopeChainNode* scopeChainNode)
    88 {
    89     Base::finishCreation(globalObject->globalData(), globalObject);
     87void JSFunction::finishCreation(ExecState* exec, FunctionExecutable* executable, ScopeChainNode* scopeChainNode)
     88{
     89    Base::finishCreation(exec->globalData());
    9090    ASSERT(inherits(&s_info));
    9191    setStructure(exec->globalData(), scopeChainNode->globalObject->namedFunctionStructure());
  • trunk/Source/JavaScriptCore/runtime/JSFunction.h

    r94599 r94701  
    2525#define JSFunction_h
    2626
    27 #include "JSObjectWithGlobalObject.h"
     27#include "JSObject.h"
    2828
    2929namespace JSC {
     
    4242    EncodedJSValue JSC_HOST_CALL callHostFunctionAsConstructor(ExecState*);
    4343
    44     class JSFunction : public JSObjectWithGlobalObject {
     44    class JSFunction : public JSNonFinalObject {
    4545        friend class JIT;
    4646        friend class DFG::JITCodeGenerator;
     
    5151       
    5252    public:
    53         typedef JSObjectWithGlobalObject Base;
     53        typedef JSNonFinalObject Base;
    5454
    5555        static JSFunction* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, int length, const Identifier& name, NativeFunction nativeFunction)
    5656        {
     57            ASSERT(structure->globalObject());
     58            ASSERT(structure->globalObject() == globalObject);
     59           
    5760            ExecutableBase* executable = (ExecutableBase*)exec->globalData().getHostFunction(nativeFunction);
    5861            JSFunction* function = new (allocateCell<JSFunction>(*exec->heap())) JSFunction(exec, globalObject, structure);
    5962            // Can't do this during initialization because getHostFunction might do a GC allocation.
    60             function->finishCreation(exec, globalObject, length, name, executable);
     63            function->finishCreation(exec, length, name, executable);
    6164            return function;
    6265        }
     
    6467        static JSFunction* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, int length, const Identifier& name, NativeExecutable* nativeExecutable)
    6568        {
     69            ASSERT(structure->globalObject());
     70            ASSERT(structure->globalObject() == globalObject);
     71
    6672            JSFunction* function = new (allocateCell<JSFunction>(*exec->heap())) JSFunction(exec, globalObject, structure);
    67             function->finishCreation(exec, globalObject, length, name, (ExecutableBase*)nativeExecutable);
     73            function->finishCreation(exec, length, name, (ExecutableBase*)nativeExecutable);
    6874            return function;
    6975        }
     
    7278        {
    7379            JSFunction* function = new (allocateCell<JSFunction>(*exec->heap())) JSFunction(exec, executable, scopeChain);
    74             function->finishCreation(exec, scopeChain->globalObject.get(), executable, scopeChain);
     80            ASSERT(function->structure()->globalObject());
     81            function->finishCreation(exec, executable, scopeChain);
    7582            return function;
    7683        }
     
    111118
    112119        static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
    113         {
     120        {
     121            ASSERT(globalObject);
    114122            return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    115123        }
     
    133141        const static unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | JSObject::StructureFlags;
    134142
    135         void finishCreation(ExecState*, JSGlobalObject*, int length, const Identifier& name, ExecutableBase*);
    136         void finishCreation(ExecState*, JSGlobalObject*, FunctionExecutable*, ScopeChainNode*);
     143        void finishCreation(ExecState*, int length, const Identifier& name, ExecutableBase*);
     144        void finishCreation(ExecState*, FunctionExecutable*, ScopeChainNode*);
    137145
    138146    private:
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r94599 r94701  
    204204    m_argumentsStructure.set(exec->globalData(), this, Arguments::createStructure(exec->globalData(), this, m_objectPrototype.get()));
    205205    m_callbackConstructorStructure.set(exec->globalData(), this, JSCallbackConstructor::createStructure(exec->globalData(), this, m_objectPrototype.get()));
    206     m_callbackObjectStructure.set(exec->globalData(), this, JSCallbackObject<JSObjectWithGlobalObject>::createStructure(exec->globalData(), this, m_objectPrototype.get()));
     206    m_callbackObjectStructure.set(exec->globalData(), this, JSCallbackObject<JSNonFinalObject>::createStructure(exec->globalData(), this, m_objectPrototype.get()));
    207207
    208208    m_arrayPrototype.set(exec->globalData(), this, ArrayPrototype::create(exec, this, ArrayPrototype::createStructure(exec->globalData(), this, m_objectPrototype.get())));
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r94644 r94701  
    5555
    5656JSONObject::JSONObject(JSGlobalObject* globalObject, Structure* structure)
    57     : JSObjectWithGlobalObject(globalObject, structure)
     57    : JSNonFinalObject(globalObject->globalData(), structure)
    5858{
    5959    finishCreation(globalObject);
     
    6262void JSONObject::finishCreation(JSGlobalObject* globalObject)
    6363{
    64     Base::finishCreation(globalObject->globalData(), globalObject);
     64    Base::finishCreation(globalObject->globalData());
    6565    ASSERT(inherits(&s_info));
    6666}
     
    590590// ------------------------------ JSONObject --------------------------------
    591591
    592 const ClassInfo JSONObject::s_info = { "JSON", &JSObjectWithGlobalObject::s_info, 0, ExecState::jsonTable };
     592const ClassInfo JSONObject::s_info = { "JSON", &JSNonFinalObject::s_info, 0, ExecState::jsonTable };
    593593
    594594/* Source for JSONObject.lut.h
  • trunk/Source/JavaScriptCore/runtime/JSONObject.h

    r94644 r94701  
    2727#define JSONObject_h
    2828
    29 #include "JSObjectWithGlobalObject.h"
     29#include "JSObject.h"
    3030
    3131namespace JSC {
     
    3333    class Stringifier;
    3434
    35     class JSONObject : public JSObjectWithGlobalObject {
     35    class JSONObject : public JSNonFinalObject {
    3636    public:
    37         typedef JSObjectWithGlobalObject Base;
     37        typedef JSNonFinalObject Base;
    3838
    3939        static JSONObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r94599 r94701  
    253253        }
    254254
     255        JSGlobalObject* globalObject() const
     256        {
     257            ASSERT(structure()->globalObject());
     258            ASSERT(!isGlobalObject() || ((JSObject*)structure()->globalObject()) == this);
     259            return structure()->globalObject();
     260        }
     261       
    255262        static size_t offsetOfInlineStorage();
    256263        static size_t offsetOfPropertyStorage();
  • trunk/Source/JavaScriptCore/runtime/JSValue.cpp

    r94629 r94701  
    202202bool JSValue::isValidCallee()
    203203{
    204     return asObject(asObject(asCell())->getAnonymousValue(0))->isGlobalObject();
     204    return asObject(asCell())->globalObject();
    205205}
    206206
  • trunk/Source/JavaScriptCore/runtime/Lookup.cpp

    r91194 r94701  
    7171void setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot)
    7272{
    73     ASSERT(thisObj->structure()->anonymousSlotCount() > 0);
    74     ASSERT(thisObj->getAnonymousValue(0).isCell() && asObject(thisObj->getAnonymousValue(0).asCell())->isGlobalObject());
     73    ASSERT(thisObj->globalObject());
    7574    ASSERT(entry->attributes() & Function);
    7675    WriteBarrierBase<Unknown>* location = thisObj->getDirectLocation(exec->globalData(), propertyName);
     
    7877    if (!location) {
    7978        JSFunction* function;
    80         JSGlobalObject* globalObject = asGlobalObject(thisObj->getAnonymousValue(0).asCell());
     79        JSGlobalObject* globalObject = thisObj->globalObject();
    8180#if ENABLE(JIT)
    8281        if (entry->generator())
  • trunk/Source/JavaScriptCore/runtime/Lookup.h

    r88604 r94701  
    2525#include "Identifier.h"
    2626#include "JSGlobalObject.h"
    27 #include "JSObject.h"
    2827#include "PropertySlot.h"
    2928#include <stdio.h>
  • trunk/Source/JavaScriptCore/runtime/MathObject.cpp

    r94644 r94701  
    6060namespace JSC {
    6161
    62 const ClassInfo MathObject::s_info = { "Math", &JSObjectWithGlobalObject::s_info, 0, ExecState::mathTable };
     62const ClassInfo MathObject::s_info = { "Math", &JSNonFinalObject::s_info, 0, ExecState::mathTable };
    6363
    6464/* Source for MathObject.lut.h
     
    8686
    8787MathObject::MathObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
    88     : JSObjectWithGlobalObject(globalObject, structure)
     88    : JSNonFinalObject(globalObject->globalData(), structure)
    8989{
    9090    finishCreation(exec, globalObject);
     
    9393void MathObject::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
    9494{
    95     Base::finishCreation(globalObject->globalData(), globalObject);
     95    Base::finishCreation(globalObject->globalData());
    9696    ASSERT(inherits(&s_info));
    9797
  • trunk/Source/JavaScriptCore/runtime/MathObject.h

    r94644 r94701  
    2222#define MathObject_h
    2323
    24 #include "JSObjectWithGlobalObject.h"
     24#include "JSObject.h"
    2525
    2626namespace JSC {
    2727
    28     class MathObject : public JSObjectWithGlobalObject {
     28    class MathObject : public JSNonFinalObject {
    2929    private:
    3030        MathObject(ExecState*, JSGlobalObject*, Structure*);
    3131
    3232    public:
    33         typedef JSObjectWithGlobalObject Base;
     33        typedef JSNonFinalObject Base;
    3434
    3535        static MathObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp

    r94644 r94701  
    2626#include "Error.h"
    2727#include "JSFunction.h"
     28#include "JSGlobalObject.h"
    2829#include "JSString.h"
    2930#include "Operations.h"
  • trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp

    r94644 r94701  
    5151ASSERT_CLASS_FITS_IN_CELL(RegExpObject);
    5252
    53 const ClassInfo RegExpObject::s_info = { "RegExp", &JSObjectWithGlobalObject::s_info, 0, ExecState::regExpTable };
     53const ClassInfo RegExpObject::s_info = { "RegExp", &JSNonFinalObject::s_info, 0, ExecState::regExpTable };
    5454
    5555/* Source for RegExpObject.lut.h
     
    6464
    6565RegExpObject::RegExpObject(JSGlobalObject* globalObject, Structure* structure, RegExp* regExp)
    66     : JSObjectWithGlobalObject(globalObject, structure)
     66    : JSNonFinalObject(globalObject->globalData(), structure)
    6767    , d(adoptPtr(new RegExpObjectData(globalObject->globalData(), this, regExp)))
    6868{
     
    7272void RegExpObject::finishCreation(JSGlobalObject* globalObject)
    7373{
    74     Base::finishCreation(globalObject->globalData(), globalObject);
     74    Base::finishCreation(globalObject->globalData());
    7575    ASSERT(inherits(&s_info));
    7676}
  • trunk/Source/JavaScriptCore/runtime/RegExpObject.h

    r94644 r94701  
    2222#define RegExpObject_h
    2323
    24 #include "JSObjectWithGlobalObject.h"
     24#include "JSObject.h"
    2525#include "RegExp.h"
    2626
    2727namespace JSC {
    2828   
    29     class RegExpObject : public JSObjectWithGlobalObject {
     29    class RegExpObject : public JSNonFinalObject {
    3030    public:
    31         typedef JSObjectWithGlobalObject Base;
     31        typedef JSNonFinalObject Base;
    3232
    3333        static RegExpObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp)
     
    7676        RegExpObject(JSGlobalObject*, Structure*, RegExp*);
    7777        void finishCreation(JSGlobalObject*);
    78         static const unsigned StructureFlags = OverridesVisitChildren | OverridesGetOwnPropertySlot | JSObjectWithGlobalObject::StructureFlags;
     78        static const unsigned StructureFlags = OverridesVisitChildren | OverridesGetOwnPropertySlot | Base::StructureFlags;
    7979
    8080    private:
  • trunk/Source/JavaScriptCore/runtime/Structure.cpp

    r94599 r94701  
    160160}
    161161
    162 Structure::Structure(JSGlobalData& globalData, JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo)
     162Structure::Structure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo)
    163163    : JSCell(globalData, globalData.structureStructure.get())
    164164    , m_typeInfo(typeInfo)
     165    , m_globalObject(globalData, this, globalObject, WriteBarrier<JSGlobalObject>::MayBeNull)
    165166    , m_prototype(globalData, this, prototype)
    166167    , m_classInfo(classInfo)
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r94599 r94701  
    6363        typedef JSCell Base;
    6464
    65         static Structure* create(JSGlobalData& globalData, JSGlobalObject*, JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo)
     65        static Structure* create(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo)
    6666        {
    6767            ASSERT(globalData.structureStructure);
    6868            ASSERT(classInfo);
    69             Structure* structure = new (allocateCell<Structure>(globalData.heap)) Structure(globalData, prototype, typeInfo, anonymousSlotCount, classInfo);
     69            Structure* structure = new (allocateCell<Structure>(globalData.heap)) Structure(globalData, globalObject, prototype, typeInfo, anonymousSlotCount, classInfo);
    7070            structure->finishCreation(globalData);
    7171            return structure;
     
    122122        const TypeInfo& typeInfo() const { ASSERT(structure()->classInfo() == &s_info); return m_typeInfo; }
    123123
    124         JSGlobalObject* globalObject() { return m_globalObject.get(); }
     124        JSGlobalObject* globalObject() const { return m_globalObject.get(); }
    125125        void setGlobalObject(JSGlobalData& globalData, JSGlobalObject* globalObject) { m_globalObject.set(globalData, this, globalObject); }
    126126       
     
    192192
    193193    private:
    194         Structure(JSGlobalData&, JSValue prototype, const TypeInfo&, unsigned anonymousSlotCount, const ClassInfo*);
     194        Structure(JSGlobalData&, JSGlobalObject*, JSValue prototype, const TypeInfo&, unsigned anonymousSlotCount, const ClassInfo*);
    195195        Structure(JSGlobalData&);
    196196        Structure(JSGlobalData&, const Structure*);
  • trunk/Source/WebCore/ChangeLog

    r94699 r94701  
     12011-09-06  Oliver Hunt  <oliver@apple.com>
     2
     3        Remove JSObjectWithGlobalObject
     4        https://bugs.webkit.org/show_bug.cgi?id=67689
     5
     6        Reviewed by Geoff Garen.
     7
     8        Remove use of anonymous storage and JSObjectWithGlobalObject for
     9        accessing a JSObject's global object now that they're available
     10        on the object's structure.
     11
     12        * bindings/js/JSDOMWindowShell.cpp:
     13        (WebCore::JSDOMWindowShell::setWindow):
     14        * bindings/js/JSDOMWrapper.h:
     15        (WebCore::JSDOMWrapper::globalObject):
     16        (WebCore::JSDOMWrapper::JSDOMWrapper):
     17        * bindings/js/WorkerScriptController.cpp:
     18        (WebCore::WorkerScriptController::initScript):
     19        * bindings/scripts/CodeGeneratorJS.pm:
     20        (GenerateHeader):
     21        (GenerateImplementation):
     22        * bridge/objc/objc_runtime.h:
     23        * bridge/objc/objc_runtime.mm:
     24        (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
     25        (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
     26        * bridge/runtime_object.cpp:
     27        (JSC::Bindings::RuntimeObject::RuntimeObject):
     28        (JSC::Bindings::RuntimeObject::finishCreation):
     29        * bridge/runtime_object.h:
     30
    1312011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
    232
  • trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp

    r94644 r94701  
    7474    Structure* structure = JSDOMWindow::createStructure(*JSDOMWindow::commonJSGlobalData(), 0, prototype.get());
    7575    JSDOMWindow* jsDOMWindow = JSDOMWindow::create(*JSDOMWindow::commonJSGlobalData(), structure, domWindow, this);
    76     prototypeStructure->setGlobalObject(*JSDOMWindow::commonJSGlobalData(), jsDOMWindow);
    77     prototype->putAnonymousValue(*JSDOMWindow::commonJSGlobalData(), 0, jsDOMWindow);
     76    prototype->structure()->setGlobalObject(*JSDOMWindow::commonJSGlobalData(), jsDOMWindow);
    7877    setWindow(*JSDOMWindow::commonJSGlobalData(), jsDOMWindow);
     78    ASSERT(jsDOMWindow->globalObject() == jsDOMWindow);
     79    ASSERT(prototype->globalObject() == jsDOMWindow);
    7980}
    8081
  • trunk/Source/WebCore/bindings/js/JSDOMWrapper.h

    r94644 r94701  
    2424
    2525#include "JSDOMGlobalObject.h"
    26 #include <runtime/JSObjectWithGlobalObject.h>
     26#include <runtime/JSObject.h>
    2727
    2828namespace WebCore {
     
    3030class ScriptExecutionContext;
    3131
    32 class JSDOMWrapper : public JSC::JSObjectWithGlobalObject {
     32class JSDOMWrapper : public JSC::JSNonFinalObject {
    3333public:
    3434    JSDOMGlobalObject* globalObject() const
    3535    {
    36         return static_cast<JSDOMGlobalObject*>(JSC::JSObjectWithGlobalObject::globalObject());
     36        return static_cast<JSDOMGlobalObject*>(JSC::JSNonFinalObject::globalObject());
    3737    }
    3838
     
    5454
    5555    explicit JSDOMWrapper(JSC::Structure* structure, JSC::JSGlobalObject* globalObject)
    56         : JSObjectWithGlobalObject(globalObject, structure)
     56        : JSNonFinalObject(globalObject->globalData(), structure)
    5757    {
    5858        // FIXME: This ASSERT is valid, but fires in fast/dom/gc-6.html when trying to create
     
    6060        // needing to reach through the frame to get to the Document*.  See bug 27640.
    6161        // ASSERT(globalObject->scriptExecutionContext());
    62         finishCreation(globalObject->globalData(), globalObject);
     62        finishCreation(globalObject->globalData());
    6363    }
    6464};
  • trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp

    r94599 r94701  
    9393        workerContextPrototype->structure()->setGlobalObject(*m_globalData, m_workerContextWrapper.get());
    9494        dedicatedContextPrototype->structure()->setGlobalObject(*m_globalData, m_workerContextWrapper.get());
    95         workerContextPrototype->putAnonymousValue(*m_globalData, 0, m_workerContextWrapper.get());
    96         dedicatedContextPrototype->putAnonymousValue(*m_globalData, 0, m_workerContextWrapper.get());
    9795#if ENABLE(SHARED_WORKERS)
    9896    } else {
     
    103101
    104102        m_workerContextWrapper.set(*m_globalData, JSSharedWorkerContext::create(*m_globalData, structure, m_workerContext->toSharedWorkerContext()));
    105         m_workerContextWrapper->structure()->setGlobalObject(*m_globalData, m_workerContextWrapper.get());
     103        workerContextPrototype->structure()->setGlobalObject(*m_globalData, m_workerContextWrapper.get());
    106104        sharedContextPrototype->structure()->setGlobalObject(*m_globalData, m_workerContextWrapper.get());
    107         workerContextPrototype->putAnonymousValue(*m_globalData, 0, m_workerContextWrapper.get());
    108         sharedContextPrototype->putAnonymousValue(*m_globalData, 0, m_workerContextWrapper.get());
    109105#endif
    110106    }
     107    ASSERT(m_workerContextWrapper->globalObject() == m_workerContextWrapper);
     108    ASSERT(asObject(m_workerContextWrapper->prototype())->globalObject() == m_workerContextWrapper);
    111109}
    112110
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r94644 r94701  
    694694    }
    695695   
    696     $headerIncludes{"<runtime/JSObjectWithGlobalObject.h>"} = 1;
     696    $headerIncludes{"<runtime/JSObject.h>"} = 1;
    697697    $headerIncludes{"SVGElement.h"} = 1 if $className =~ /^JSSVG/;
    698698
     
    10211021    # Add prototype declaration.
    10221022    %structureFlags = ();
    1023     push(@headerContent, "class ${className}Prototype : public JSC::JSObjectWithGlobalObject {\n");
     1023    push(@headerContent, "class ${className}Prototype : public JSC::JSNonFinalObject {\n");
    10241024    push(@headerContent, "public:\n");
    1025     push(@headerContent, "    typedef JSC::JSObjectWithGlobalObject Base;\n");
     1025    push(@headerContent, "    typedef JSC::JSNonFinalObject Base;\n");
    10261026    if ($interfaceName ne "DOMWindow" && !$dataNode->extendedAttributes->{"IsWorkerContext"}) {
    10271027        push(@headerContent, "    static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);\n");
     
    10581058
    10591059    push(@headerContent, "\nprivate:\n");
    1060     push(@headerContent, "    ${className}Prototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) : JSC::JSObjectWithGlobalObject(globalData, structure) { finishCreation(globalData, globalObject); }\n");
     1060    push(@headerContent, "    ${className}Prototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { finishCreation(globalData); }\n");
    10611061
    10621062    # structure flags
     
    14211421        push(@implContent, "    return getHashTableForGlobalData(exec->globalData(), &${className}PrototypeTable);\n");
    14221422        push(@implContent, "}\n\n");
    1423         push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleClassName}Prototype\", &JSC::JSObjectWithGlobalObject::s_info, 0, get${className}PrototypeTable };\n\n");
     1423        push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleClassName}Prototype\", &JSC::JSNonFinalObject::s_info, 0, get${className}PrototypeTable };\n\n");
    14241424    } else {
    1425         push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleClassName}Prototype\", &JSC::JSObjectWithGlobalObject::s_info, &${className}PrototypeTable, 0 };\n\n");
     1425        push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleClassName}Prototype\", &JSC::JSNonFinalObject::s_info, &${className}PrototypeTable, 0 };\n\n");
    14261426    }
    14271427    if ($interfaceName ne "DOMWindow" && !$dataNode->extendedAttributes->{"IsWorkerContext"}) {
  • trunk/Source/WebCore/bridge/objc/objc_runtime.h

    r94644 r94701  
    3131#include "objc_header.h"
    3232#include <runtime/JSGlobalObject.h>
    33 #include <runtime/JSObjectWithGlobalObject.h>
    3433#include <wtf/RetainPtr.h>
    3534
     
    9291};
    9392
    94 class ObjcFallbackObjectImp : public JSObjectWithGlobalObject {
     93class ObjcFallbackObjectImp : public JSNonFinalObject {
    9594public:
    96     typedef JSObjectWithGlobalObject Base;
     95    typedef JSNonFinalObject Base;
    9796
    9897    static ObjcFallbackObjectImp* create(ExecState* exec, JSGlobalObject* globalObject, ObjcInstance* instance, const Identifier& propertyName)
  • trunk/Source/WebCore/bridge/objc/objc_runtime.mm

    r94644 r94701  
    195195}
    196196
    197 const ClassInfo ObjcFallbackObjectImp::s_info = { "ObjcFallbackObject", &JSObjectWithGlobalObject::s_info, 0, 0 };
     197const ClassInfo ObjcFallbackObjectImp::s_info = { "ObjcFallbackObject", &JSNonFinalObject::s_info, 0, 0 };
    198198
    199199ObjcFallbackObjectImp::ObjcFallbackObjectImp(JSGlobalObject* globalObject, Structure* structure, ObjcInstance* i, const Identifier& propertyName)
    200     : JSObjectWithGlobalObject(globalObject, structure)
     200    : JSNonFinalObject(globalObject->globalData(), structure)
    201201    , _instance(i)
    202202    , _item(propertyName)
    203203{
    204204    finishCreation(globalObject);
     205    ASSERT(structure->globalObject() == globalObject);
    205206}
    206207
    207208void ObjcFallbackObjectImp::finishCreation(JSGlobalObject* globalObject)
    208209{
    209     Base::finishCreation(globalObject->globalData(), globalObject);
     210    Base::finishCreation(globalObject->globalData());
    210211    ASSERT(inherits(&s_info));
    211212}
  • trunk/Source/WebCore/bridge/runtime_object.cpp

    r94644 r94701  
    3636namespace Bindings {
    3737
    38 const ClassInfo RuntimeObject::s_info = { "RuntimeObject", &JSObjectWithGlobalObject::s_info, 0, 0 };
     38const ClassInfo RuntimeObject::s_info = { "RuntimeObject", &JSNonFinalObject::s_info, 0, 0 };
    3939
    4040RuntimeObject::RuntimeObject(ExecState*, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance)
    41     : JSObjectWithGlobalObject(globalObject, structure)
     41    : JSNonFinalObject(globalObject->globalData(), structure)
    4242    , m_instance(instance)
    4343{
     44    ASSERT(structure->globalObject() == globalObject);
    4445    finishCreation(globalObject);
    4546}
     
    4748void RuntimeObject::finishCreation(JSGlobalObject* globalObject)
    4849{
    49     Base::finishCreation(globalObject->globalData(), globalObject);
     50    Base::finishCreation(globalObject->globalData());
    5051    ASSERT(inherits(&s_info));
    5152}
  • trunk/Source/WebCore/bridge/runtime_object.h

    r94644 r94701  
    2929#include "BridgeJSC.h"
    3030#include <runtime/JSGlobalObject.h>
    31 #include <runtime/JSObjectWithGlobalObject.h>
    3231
    3332namespace JSC {
    3433namespace Bindings {
    3534
    36 class RuntimeObject : public JSObjectWithGlobalObject {
     35class RuntimeObject : public JSNonFinalObject {
    3736public:
    38     typedef JSObjectWithGlobalObject Base;
     37    typedef JSNonFinalObject Base;
    3938
    4039    static RuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance)
     
    7675    RuntimeObject(ExecState*, JSGlobalObject*, Structure*, PassRefPtr<Instance>);
    7776    void finishCreation(JSGlobalObject*);
    78     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | JSObjectWithGlobalObject::StructureFlags;
     77    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | Base::StructureFlags;
    7978
    8079private:
  • trunk/Source/WebKit2/ChangeLog

    r94685 r94701  
     12011-09-06  Oliver Hunt  <oliver@apple.com>
     2
     3        Remove JSObjectWithGlobalObject
     4        https://bugs.webkit.org/show_bug.cgi?id=67689
     5
     6        Reviewed by Geoff Garen.
     7
     8        Remove JSObjectWithGlobalObject usage.
     9
     10        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
     11        (WebKit::JSNPObject::JSNPObject):
     12        (WebKit::JSNPObject::finishCreation):
     13        * WebProcess/Plugins/Netscape/JSNPObject.h:
     14
    1152011-09-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
    216
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp

    r94644 r94701  
    4949}
    5050
    51 const ClassInfo JSNPObject::s_info = { "NPObject", &JSObjectWithGlobalObject::s_info, 0, 0 };
     51const ClassInfo JSNPObject::s_info = { "NPObject", &JSNonFinalObject::s_info, 0, 0 };
    5252
    5353JSNPObject::JSNPObject(JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject, Structure* structure)
    54     : JSObjectWithGlobalObject(globalObject, structure)
     54    : JSNonFinalObject(globalObject->globalData(), structure)
    5555    , m_objectMap(objectMap)
    5656    , m_npObject(npObject)
    5757{
     58    ASSERT(globalObject == structure->globalObject());
    5859    finishCreation(globalObject);
    5960}
     
    6162void JSNPObject::finishCreation(JSGlobalObject* globalObject)
    6263{
    63     Base::finishCreation(globalObject->globalData(), globalObject);
     64    Base::finishCreation(globalObject->globalData());
    6465    ASSERT(inherits(&s_info));
    6566
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h

    r94644 r94701  
    2727#define JSNPObject_h
    2828
    29 #include <JavaScriptCore/JSObjectWithGlobalObject.h>
     29#include <JavaScriptCore/JSObject.h>
    3030
    3131typedef void* NPIdentifier;
     
    3838// JSNPObject is a JSObject that wraps an NPObject.
    3939
    40 class JSNPObject : public JSC::JSObjectWithGlobalObject {
     40class JSNPObject : public JSC::JSNonFinalObject {
    4141public:
    42     typedef JSC::JSObjectWithGlobalObject Base;
     42    typedef JSC::JSNonFinalObject Base;
    4343
    4444    static JSNPObject* create(JSC::JSGlobalObject*, NPRuntimeObjectMap*, NPObject*);
Note: See TracChangeset for help on using the changeset viewer.