Changeset 156680 in webkit
- Timestamp:
- Sep 30, 2013 2:42:05 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r156679 r156680 1 2013-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 1 11 2013-09-30 Andreas Kling <akling@apple.com> 2 12 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r156679 r156680 239 239 m_callFunction.set(vm, this, callFunction); 240 240 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()))); 242 242 GetterSetter* protoAccessor = GetterSetter::create(vm); 243 243 protoAccessor->setGetter(vm, JSFunction::create(vm, this, 0, String(), globalFuncProtoGetter)); -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
r155143 r156680 46 46 const ClassInfo ObjectPrototype::s_info = { "Object", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(ObjectPrototype) }; 47 47 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 48 ObjectPrototype::ObjectPrototype(VM& vm, Structure* stucture) 49 : JSNonFinalObject(vm, stucture) 50 { 51 } 52 53 void ObjectPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject) 54 { 57 55 Base::finishCreation(vm); 58 56 ASSERT(inherits(info())); … … 71 69 } 72 70 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);71 ObjectPrototype* 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); 77 75 return prototype; 78 76 } -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h
r154038 r156680 30 30 typedef JSNonFinalObject Base; 31 31 32 static ObjectPrototype* create( ExecState*, JSGlobalObject*, Structure*);32 static ObjectPrototype* create(VM&, JSGlobalObject*, Structure*); 33 33 34 34 DECLARE_INFO; … … 40 40 41 41 protected: 42 void finishCreation( ExecState*, JSGlobalObject*);42 void finishCreation(VM&, JSGlobalObject*); 43 43 44 44 private: 45 ObjectPrototype( ExecState*, Structure*);45 ObjectPrototype(VM&, Structure*); 46 46 }; 47 47
Note: See TracChangeset
for help on using the changeset viewer.