Changeset 27022 in webkit for trunk/JavaScriptCore/API/JSContextRef.cpp
- Timestamp:
- Oct 24, 2007, 11:38:35 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSContextRef.cpp
r25257 r27022 30 30 31 31 #include "JSCallbackObject.h" 32 #include "JSGlobalObject.h" 32 33 #include "completion.h" 33 34 #include "interpreter.h" … … 40 41 JSLock lock; 41 42 42 JS Object* globalObject;43 JSGlobalObject* globalObject; 43 44 if (globalObjectClass) 44 45 // Specify jsNull() as the prototype. Interpreter will fix it up to point at builtinObjectPrototype() in its constructor 45 globalObject = new JSCallbackObject (0, globalObjectClass, jsNull(), 0);46 globalObject = new JSCallbackObject<JSGlobalObject>(0, globalObjectClass, jsNull(), 0); 46 47 else 47 globalObject = new JS Object();48 globalObject = new JSGlobalObject(); 48 49 49 50 Interpreter* interpreter = new Interpreter(globalObject); // adds the built-in object prototype to the global object 50 51 if (globalObjectClass) 51 static_cast<JSCallbackObject *>(globalObject)->initializeIfNeeded(interpreter->globalExec());52 static_cast<JSCallbackObject<JSGlobalObject>*>(globalObject)->initializeIfNeeded(interpreter->globalExec()); 52 53 JSGlobalContextRef ctx = reinterpret_cast<JSGlobalContextRef>(interpreter->globalExec()); 53 54 return JSGlobalContextRetain(ctx);
Note:
See TracChangeset
for help on using the changeset viewer.