Changeset 15484 in webkit for trunk/JavaScriptCore/API/JSNode.c
- Timestamp:
- Jul 17, 2006, 3:49:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSNode.c
r15483 r15484 157 157 }; 158 158 159 static void JSNode_initialize(JSContextRef context, JSObjectRef object) 160 { 161 Node* node = JSObjectGetPrivate(object); 162 assert(node); 163 164 Node_ref(node); 165 } 166 159 167 static void JSNode_finalize(JSObjectRef object) 160 168 { … … 171 179 JSClassDefinition definition = kJSClassDefinitionNull; 172 180 definition.staticValues = JSNode_staticValues; 181 definition.initialize = JSNode_initialize; 173 182 definition.finalize = JSNode_finalize; 174 183 … … 182 191 static JSObjectRef prototype; 183 192 if (!prototype) { 184 prototype = JSObjectMake(context, JSNodePrototype_class(context), NULL , NULL);193 prototype = JSObjectMake(context, JSNodePrototype_class(context), NULL); 185 194 JSValueProtect(context, prototype); 186 195 } … … 190 199 JSObjectRef JSNode_new(JSContextRef context, Node* node) 191 200 { 192 Node_ref(node); 193 194 JSObjectRef jsNode = JSObjectMake(context, JSNode_class(context), JSNode_prototype(context), NULL); 195 JSObjectSetPrivate(jsNode, node); 196 return jsNode; 201 return JSObjectMakeWithData(context, JSNode_class(context), JSNode_prototype(context), node); 197 202 } 198 203
Note:
See TracChangeset
for help on using the changeset viewer.