Changeset 27207 in webkit for trunk/JavaScriptCore/API
- Timestamp:
- Oct 28, 2007, 9:31:54 PM (18 years ago)
- Location:
- trunk/JavaScriptCore/API
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSNode.c
r26688 r27207 66 66 if (JSValueIsObjectOfClass(context, arguments[0], JSNode_class(context))) { 67 67 Node* node = JSObjectGetPrivate(thisObject); 68 Node* child = JSObjectGetPrivate(JSValueToObject(context, arguments[0], NULL));68 Node* child = JSObjectGetPrivate(JSValueToObject(context, arguments[0], exception)); 69 69 70 70 Node_removeChild(node, child); … … 86 86 if (JSValueIsObjectOfClass(context, arguments[1], JSNode_class(context))) { 87 87 Node* node = JSObjectGetPrivate(thisObject); 88 Node* newChild = JSObjectGetPrivate(JSValueToObject(context, arguments[0], NULL));89 Node* oldChild = JSObjectGetPrivate(JSValueToObject(context, arguments[1], NULL));88 Node* newChild = JSObjectGetPrivate(JSValueToObject(context, arguments[0], exception)); 89 Node* oldChild = JSObjectGetPrivate(JSValueToObject(context, arguments[1], exception)); 90 90 91 91 Node_replaceChild(node, newChild, oldChild); … … 109 109 UNUSED_PARAM(context); 110 110 UNUSED_PARAM(propertyName); 111 UNUSED_PARAM(exception); 111 112 112 113 Node* node = JSObjectGetPrivate(object); … … 124 125 { 125 126 UNUSED_PARAM(propertyName); 127 UNUSED_PARAM(exception); 128 126 129 Node* node = JSObjectGetPrivate(thisObject); 127 130 ASSERT(node); … … 134 137 UNUSED_PARAM(propertyName); 135 138 UNUSED_PARAM(object); 139 UNUSED_PARAM(exception); 136 140 137 141 return JSValueMakeUndefined(context); … … 147 151 static void JSNode_initialize(JSContextRef context, JSObjectRef object) 148 152 { 153 UNUSED_PARAM(context); 154 149 155 Node* node = JSObjectGetPrivate(object); 150 156 ASSERT(node); … … 163 169 JSClassRef JSNode_class(JSContextRef context) 164 170 { 171 UNUSED_PARAM(context); 172 165 173 static JSClassRef jsClass; 166 174 if (!jsClass) { … … 186 194 UNUSED_PARAM(argumentCount); 187 195 UNUSED_PARAM(arguments); 196 UNUSED_PARAM(exception); 188 197 189 198 return JSNode_new(context, Node_new()); -
trunk/JavaScriptCore/API/JSNodeList.c
r26688 r27207 32 32 static JSValueRef JSNodeList_item(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 33 33 { 34 UNUSED_PARAM(object); 35 34 36 if (argumentCount > 0) { 35 37 NodeList* nodeList = JSObjectGetPrivate(thisObject); … … 51 53 { 52 54 UNUSED_PARAM(context); 55 UNUSED_PARAM(propertyName); 56 UNUSED_PARAM(exception); 53 57 54 58 NodeList* nodeList = JSObjectGetPrivate(thisObject); … … 79 83 static void JSNodeList_initialize(JSContextRef context, JSObjectRef thisObject) 80 84 { 85 UNUSED_PARAM(context); 86 81 87 NodeList* nodeList = JSObjectGetPrivate(thisObject); 82 88 ASSERT(nodeList); … … 95 101 static JSClassRef JSNodeList_class(JSContextRef context) 96 102 { 103 UNUSED_PARAM(context); 104 97 105 static JSClassRef jsClass; 98 106 if (!jsClass) { -
trunk/JavaScriptCore/API/minidom.c
r26688 r27207 74 74 static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 75 75 { 76 UNUSED_PARAM(object); 77 UNUSED_PARAM(thisObject); 78 76 79 if (argumentCount > 0) { 77 JSStringRef string = JSValueToStringCopy(context, arguments[0], NULL);80 JSStringRef string = JSValueToStringCopy(context, arguments[0], exception); 78 81 size_t numChars = JSStringGetMaximumUTF8CStringSize(string); 79 82 char stringUTF8[numChars]; -
trunk/JavaScriptCore/API/testapi.c
r26688 r27207 142 142 UNUSED_PARAM(object); 143 143 UNUSED_PARAM(value); 144 UNUSED_PARAM(exception); 144 145 145 146 if (JSStringIsEqualToUTF8CString(propertyName, "cantSet")) … … 168 169 { 169 170 UNUSED_PARAM(context); 171 UNUSED_PARAM(object); 170 172 171 173 JSStringRef propertyName; … … 185 187 UNUSED_PARAM(object); 186 188 UNUSED_PARAM(thisObject); 189 UNUSED_PARAM(exception); 187 190 188 191 if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(context, 0))) … … 198 201 199 202 if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(context, 0))) 200 return JSValueToObject(context, JSValueMakeNumber(context, 1), NULL);201 202 return JSValueToObject(context, JSValueMakeNumber(context, 0), NULL);203 return JSValueToObject(context, JSValueMakeNumber(context, 1), exception); 204 205 return JSValueToObject(context, JSValueMakeNumber(context, 0), exception); 203 206 } 204 207 … … 206 209 { 207 210 UNUSED_PARAM(context); 211 UNUSED_PARAM(constructor); 208 212 209 213 JSStringRef numberString = JSStringCreateWithUTF8CString("Number"); 210 JSObjectRef numberConstructor = JSValueToObject(context, JSObjectGetProperty(context, JSContextGetGlobalObject(context), numberString, NULL), NULL);214 JSObjectRef numberConstructor = JSValueToObject(context, JSObjectGetProperty(context, JSContextGetGlobalObject(context), numberString, exception), exception); 211 215 JSStringRelease(numberString); 212 216 213 return JSValueIsInstanceOfConstructor(context, possibleValue, numberConstructor, NULL);217 return JSValueIsInstanceOfConstructor(context, possibleValue, numberConstructor, exception); 214 218 } 215 219 216 220 static JSValueRef MyObject_convertToType(JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception) 217 221 { 218 UNUSED_PARAM( context);219 UNUSED_PARAM( object);222 UNUSED_PARAM(object); 223 UNUSED_PARAM(exception); 220 224 221 225 switch (type) { … … 265 269 static JSClassRef MyObject_class(JSContextRef context) 266 270 { 271 UNUSED_PARAM(context); 272 267 273 static JSClassRef jsClass; 268 274 if (!jsClass) … … 274 280 static JSValueRef Base_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) 275 281 { 276 UNUSED_PARAM(ctx);277 282 UNUSED_PARAM(object); 278 283 UNUSED_PARAM(propertyName); 284 UNUSED_PARAM(exception); 279 285 280 286 return JSValueMakeNumber(ctx, 1); // distinguish base get form derived get … … 283 289 static bool Base_set(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) 284 290 { 285 UNUSED_PARAM(ctx);286 291 UNUSED_PARAM(object); 287 292 UNUSED_PARAM(propertyName); … … 294 299 static JSValueRef Base_callAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 295 300 { 296 UNUSED_PARAM(ctx);297 301 UNUSED_PARAM(function); 298 302 UNUSED_PARAM(thisObject); 299 303 UNUSED_PARAM(argumentCount); 300 304 UNUSED_PARAM(arguments); 305 UNUSED_PARAM(exception); 301 306 302 307 return JSValueMakeNumber(ctx, 1); // distinguish base call from derived call … … 318 323 static void Base_initialize(JSContextRef context, JSObjectRef object) 319 324 { 325 UNUSED_PARAM(context); 326 320 327 if (TestInitializeFinalize) { 321 328 ASSERT((void*)1 == JSObjectGetPrivate(object)); … … 335 342 static JSClassRef Base_class(JSContextRef context) 336 343 { 344 UNUSED_PARAM(context); 345 337 346 static JSClassRef jsClass; 338 347 if (!jsClass) { … … 349 358 static JSValueRef Derived_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) 350 359 { 351 UNUSED_PARAM(ctx);352 360 UNUSED_PARAM(object); 353 361 UNUSED_PARAM(propertyName); 362 UNUSED_PARAM(exception); 354 363 355 364 return JSValueMakeNumber(ctx, 2); // distinguish base get form derived get … … 369 378 static JSValueRef Derived_callAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 370 379 { 371 UNUSED_PARAM(ctx);372 380 UNUSED_PARAM(function); 373 381 UNUSED_PARAM(thisObject); 374 382 UNUSED_PARAM(argumentCount); 375 383 UNUSED_PARAM(arguments); 384 UNUSED_PARAM(exception); 376 385 377 386 return JSValueMakeNumber(ctx, 2); // distinguish base call from derived call … … 394 403 static void Derived_initialize(JSContextRef context, JSObjectRef object) 395 404 { 405 UNUSED_PARAM(context); 406 396 407 if (TestInitializeFinalize) { 397 408 ASSERT((void*)2 == JSObjectGetPrivate(object)); … … 427 438 UNUSED_PARAM(functionObject); 428 439 UNUSED_PARAM(thisObject); 440 UNUSED_PARAM(exception); 429 441 430 442 if (argumentCount > 0) { … … 443 455 { 444 456 UNUSED_PARAM(constructorObject); 457 UNUSED_PARAM(exception); 445 458 446 459 JSObjectRef result = JSObjectMake(context, NULL, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.