Changeset 18461 in webkit for trunk/JavaScriptCore/bindings/NP_jsobject.cpp
- Timestamp:
- Dec 28, 2006, 5:44:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bindings/NP_jsobject.cpp
r15972 r18461 62 62 static bool _isSafeScript(JavaScriptObject* obj) 63 63 { 64 if (obj->origin ExecutionContext) {65 Interpreter* originInterpreter = obj->origin ExecutionContext->interpreter();64 if (obj->originRootObject) { 65 Interpreter* originInterpreter = obj->originRootObject->interpreter(); 66 66 if (originInterpreter) 67 return originInterpreter->isSafeScript(obj-> executionContext->interpreter());67 return originInterpreter->isSafeScript(obj->rootObject->interpreter()); 68 68 } 69 69 return true; 70 70 } 71 71 72 NPObject *_NPN_CreateScriptObject (NPP npp, JSObject *imp, const RootObject *originExecutionContext, const RootObject *executionContext)72 NPObject* _NPN_CreateScriptObject (NPP npp, JSObject* imp, const RootObject* originRootObject, const RootObject* rootObject) 73 73 { 74 74 JavaScriptObject* obj = (JavaScriptObject*)_NPN_CreateObject(npp, NPScriptObjectClass); 75 75 76 76 obj->imp = imp; 77 obj->origin ExecutionContext = originExecutionContext;78 obj-> executionContext = executionContext;79 80 addNativeReference( executionContext, imp);77 obj->originRootObject = originRootObject; 78 obj->rootObject = rootObject; 79 80 addNativeReference(rootObject, imp); 81 81 82 82 return (NPObject *)obj; … … 120 120 121 121 // Lookup the function object. 122 ExecState* exec = obj-> executionContext->interpreter()->globalExec();122 ExecState* exec = obj->rootObject->interpreter()->globalExec(); 123 123 JSLock lock; 124 124 JSValue* func = obj->imp->get(exec, identifierFromNPIdentifier(i->value.string)); … … 157 157 return false; 158 158 159 ExecState* exec = obj-> executionContext->interpreter()->globalExec();159 ExecState* exec = obj->rootObject->interpreter()->globalExec(); 160 160 161 161 JSLock lock; … … 163 163 unsigned int UTF16Length; 164 164 convertNPStringToUTF16(s, &scriptString, &UTF16Length); // requires free() of returned memory 165 Completion completion = obj-> executionContext->interpreter()->evaluate(UString(), 0, UString((const UChar*)scriptString,UTF16Length));165 Completion completion = obj->rootObject->interpreter()->evaluate(UString(), 0, UString((const UChar*)scriptString,UTF16Length)); 166 166 ComplType type = completion.complType(); 167 167 … … 192 192 return false; 193 193 194 ExecState* exec = obj-> executionContext->interpreter()->globalExec();194 ExecState* exec = obj->rootObject->interpreter()->globalExec(); 195 195 PrivateIdentifier* i = (PrivateIdentifier*)propertyName; 196 196 … … 231 231 return false; 232 232 233 ExecState* exec = obj-> executionContext->interpreter()->globalExec();233 ExecState* exec = obj->rootObject->interpreter()->globalExec(); 234 234 JSLock lock; 235 235 PrivateIdentifier* i = (PrivateIdentifier*)propertyName; … … 254 254 return false; 255 255 256 ExecState* exec = obj-> executionContext->interpreter()->globalExec();256 ExecState* exec = obj->rootObject->interpreter()->globalExec(); 257 257 PrivateIdentifier* i = (PrivateIdentifier*)propertyName; 258 258 if (i->isString) { … … 282 282 return false; 283 283 284 ExecState* exec = obj-> executionContext->interpreter()->globalExec();284 ExecState* exec = obj->rootObject->interpreter()->globalExec(); 285 285 PrivateIdentifier* i = (PrivateIdentifier*)propertyName; 286 286 JSLock lock; … … 307 307 return false; 308 308 309 ExecState* exec = obj-> executionContext->interpreter()->globalExec();309 ExecState* exec = obj->rootObject->interpreter()->globalExec(); 310 310 JSLock lock; 311 311 JSValue* func = obj->imp->get(exec, identifierFromNPIdentifier(i->value.string)); … … 323 323 if (o->_class == NPScriptObjectClass) { 324 324 JavaScriptObject* obj = (JavaScriptObject*)o; 325 ExecState* exec = obj-> executionContext->interpreter()->globalExec();325 ExecState* exec = obj->rootObject->interpreter()->globalExec(); 326 326 JSLock lock; 327 327 throwError(exec, GeneralError, message);
Note:
See TracChangeset
for help on using the changeset viewer.