Changeset 34659 in webkit for trunk/JavaScriptCore/API/JSObjectRef.cpp
- Timestamp:
- Jun 19, 2008, 10:29:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSObjectRef.cpp
r34607 r34659 75 75 76 76 if (!jsClass) 77 return toRef(new JSObject(exec->lexicalGlobalObject()->objectPrototype())); // slightly more efficient77 return toRef(new (exec) JSObject(exec->lexicalGlobalObject()->objectPrototype())); // slightly more efficient 78 78 79 79 JSValue* jsPrototype = jsClass->prototype(ctx); … … 81 81 jsPrototype = exec->lexicalGlobalObject()->objectPrototype(); 82 82 83 return toRef(new JSCallbackObject<JSObject>(exec, jsClass, jsPrototype, data));83 return toRef(new (exec) JSCallbackObject<JSObject>(exec, jsClass, jsPrototype, data)); 84 84 } 85 85 … … 90 90 Identifier nameID = name ? Identifier(exec, toJS(name)) : Identifier(exec, "anonymous"); 91 91 92 return toRef(new JSCallbackFunction(exec, callAsFunction, nameID));92 return toRef(new (exec) JSCallbackFunction(exec, callAsFunction, nameID)); 93 93 } 94 94 … … 102 102 : exec->dynamicGlobalObject()->objectPrototype(); 103 103 104 JSCallbackConstructor* constructor = new JSCallbackConstructor(exec, jsClass, callAsConstructor);104 JSCallbackConstructor* constructor = new (exec) JSCallbackConstructor(exec, jsClass, callAsConstructor); 105 105 constructor->putDirect(exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly); 106 106 return toRef(constructor); … … 119 119 ArgList args; 120 120 for (unsigned i = 0; i < parameterCount; i++) 121 args.append(jsString( UString(toJS(parameterNames[i]))));122 args.append(jsString( UString(bodyRep)));121 args.append(jsString(exec, UString(toJS(parameterNames[i])))); 122 args.append(jsString(exec, UString(bodyRep))); 123 123 124 124 JSObject* result = exec->dynamicGlobalObject()->functionConstructor()->construct(exec, args, nameID, UString(sourceURLRep), startingLineNumber);
Note:
See TracChangeset
for help on using the changeset viewer.