Changeset 84583 in webkit
- Timestamp:
- Apr 21, 2011 6:30:50 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r84556 r84583 1 2011-04-21 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Geoffrey Garen. 4 5 Object.create creates uncachable objects 6 https://bugs.webkit.org/show_bug.cgi?id=59164 7 8 Use the prototype object's inheritorID, as we 9 should always have done 10 11 * runtime/ObjectConstructor.cpp: 12 (JSC::objectConstructorCreate): 13 1 14 2011-04-21 Oliver Hunt <oliver@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r84052 r84583 342 342 if (!exec->argument(0).isObject() && !exec->argument(0).isNull()) 343 343 return throwVMError(exec, createTypeError(exec, "Object prototype may only be an Object or null.")); 344 JS Object* newObject = constructEmptyObject(exec);345 newObject->setPrototype(exec->globalData(), exec->argument(0));344 JSValue proto = exec->argument(0); 345 JSObject* newObject = proto.isObject() ? constructEmptyObject(exec, asObject(proto)->inheritorID(exec->globalData())) : constructEmptyObject(exec); 346 346 if (exec->argument(1).isUndefined()) 347 347 return JSValue::encode(newObject);
Note: See TracChangeset
for help on using the changeset viewer.