Changeset 31872 in webkit for trunk/JavaScriptCore/API/JSClassRef.cpp
- Timestamp:
- Apr 14, 2008, 11:48:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSClassRef.cpp
r30413 r31872 118 118 protoDefinition.staticFunctions = staticFunctions; 119 119 protoDefinition.finalize = clearReferenceToPrototype; 120 OpaqueJSClass* protoClass = new OpaqueJSClass(&protoDefinition, 0); 120 121 // We are supposed to use JSClassRetain/Release but since we know that we currently have 122 // the only reference to this class object we cheat and use a RefPtr instead. 123 RefPtr<OpaqueJSClass> protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0)); 121 124 122 125 // remove functions from the original class 123 126 JSClassDefinition objectDefinition = *definition; 124 127 objectDefinition.staticFunctions = 0; 125 return adoptRef(new OpaqueJSClass(&objectDefinition, protoClass)); 128 129 return adoptRef(new OpaqueJSClass(&objectDefinition, protoClass.get())); 126 130 } 127 131
Note:
See TracChangeset
for help on using the changeset viewer.