Changeset 36726 in webkit for trunk/JavaScriptCore/API/JSClassRef.cpp
- Timestamp:
- Sep 20, 2008, 7:29:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSClassRef.cpp
r36263 r36726 236 236 if (!jsClassData.cachedPrototype) { 237 237 // Recursive, but should be good enough for our purposes 238 JSObject* parentPrototype = 0; 239 if (parentClass) 240 parentPrototype = parentClass->prototype(exec); // can be null 241 if (!parentPrototype) 242 parentPrototype = exec->dynamicGlobalObject()->objectPrototype(); 243 jsClassData.cachedPrototype = new (exec) JSCallbackObject<JSObject>(exec, prototypeClass, parentPrototype, &jsClassData); // set jsClassData as the object's private data, so it can clear our reference on destruction 238 jsClassData.cachedPrototype = new (exec) JSCallbackObject<JSObject>(exec, exec->lexicalGlobalObject()->callbackObjectStructure(), prototypeClass, &jsClassData); // set jsClassData as the object's private data, so it can clear our reference on destruction 239 if (parentClass) { 240 if (JSObject* prototype = parentClass->prototype(exec)) 241 jsClassData.cachedPrototype->setPrototype(prototype); 242 } 244 243 } 245 244 return jsClassData.cachedPrototype;
Note:
See TracChangeset
for help on using the changeset viewer.