Changeset 156680 in webkit


Ignore:
Timestamp:
Sep 30, 2013 2:42:05 PM (10 years ago)
Author:
akling@apple.com
Message:

Pass VM instead of ExecState to ObjectPrototype constructor.
<https://webkit.org/b/122116>

Reviewed by Geoffrey Garen.

The ObjectPrototype constructor was only using the ExecState to get
to the VM.

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r156679 r156680  
     12013-09-30  Andreas Kling  <akling@apple.com>
     2
     3        Pass VM instead of ExecState to ObjectPrototype constructor.
     4        <https://webkit.org/b/122116>
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        The ObjectPrototype constructor was only using the ExecState to get
     9        to the VM.
     10
    1112013-09-30  Andreas Kling  <akling@apple.com>
    212
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r156679 r156680  
    239239    m_callFunction.set(vm, this, callFunction);
    240240    m_applyFunction.set(vm, this, applyFunction);
    241     m_objectPrototype.set(vm, this, ObjectPrototype::create(exec, this, ObjectPrototype::createStructure(vm, this, jsNull())));
     241    m_objectPrototype.set(vm, this, ObjectPrototype::create(vm, this, ObjectPrototype::createStructure(vm, this, jsNull())));
    242242    GetterSetter* protoAccessor = GetterSetter::create(vm);
    243243    protoAccessor->setGetter(vm, JSFunction::create(vm, this, 0, String(), globalFuncProtoGetter));
  • trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp

    r155143 r156680  
    4646const ClassInfo ObjectPrototype::s_info = { "Object", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(ObjectPrototype) };
    4747
    48 ObjectPrototype::ObjectPrototype(ExecState* exec, Structure* stucture)
    49     : JSNonFinalObject(exec->vm(), stucture)
    50 {
    51 }
    52 
    53 void ObjectPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
    54 {
    55     VM& vm = exec->vm();
    56    
     48ObjectPrototype::ObjectPrototype(VM& vm, Structure* stucture)
     49    : JSNonFinalObject(vm, stucture)
     50{
     51}
     52
     53void ObjectPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
     54{
    5755    Base::finishCreation(vm);
    5856    ASSERT(inherits(info()));
     
    7169}
    7270
    73 ObjectPrototype* ObjectPrototype::create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
    74 {
    75     ObjectPrototype* prototype = new (NotNull, allocateCell<ObjectPrototype>(*exec->heap())) ObjectPrototype(exec, structure);
    76     prototype->finishCreation(exec, globalObject);
     71ObjectPrototype* ObjectPrototype::create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     72{
     73    ObjectPrototype* prototype = new (NotNull, allocateCell<ObjectPrototype>(vm.heap)) ObjectPrototype(vm, structure);
     74    prototype->finishCreation(vm, globalObject);
    7775    return prototype;
    7876}
  • trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h

    r154038 r156680  
    3030        typedef JSNonFinalObject Base;
    3131
    32         static ObjectPrototype* create(ExecState*, JSGlobalObject*, Structure*);
     32        static ObjectPrototype* create(VM&, JSGlobalObject*, Structure*);
    3333
    3434        DECLARE_INFO;
     
    4040
    4141    protected:
    42         void finishCreation(ExecState*, JSGlobalObject*);
     42        void finishCreation(VM&, JSGlobalObject*);
    4343
    4444    private:
    45         ObjectPrototype(ExecState*, Structure*);
     45        ObjectPrototype(VM&, Structure*);
    4646    };
    4747
Note: See TracChangeset for help on using the changeset viewer.