Changeset 14932 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jun 20, 2006, 5:20:00 PM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r14913 r14932 1 2006-06-20 Timothy Hatcher <[email protected]> 2 3 Reviewed by Geoff. 4 5 Make sure we clear the exception before returning so 6 that future calls will not fail because of an earlier 7 exception state. Assert on entry that the WebScriptObject 8 is working with an ExecState that dose not have an exception. 9 Document that evaluateWebScript and callWebScriptMethod return 10 WebUndefined when an exception is thrown. 11 12 * bindings/objc/WebScriptObject.h: 13 * bindings/objc/WebScriptObject.mm: 14 (-[WebScriptObject callWebScriptMethod:withArguments:]): 15 (-[WebScriptObject evaluateWebScript:]): 16 (-[WebScriptObject setValue:forKey:]): 17 (-[WebScriptObject valueForKey:]): 18 (-[WebScriptObject removeWebScriptKey:]): 19 (-[WebScriptObject webScriptValueAtIndex:]): 20 (-[WebScriptObject setWebScriptValueAtIndex:value:]): 21 1 22 2006-06-19 Anders Carlsson <[email protected]> 2 23 -
trunk/JavaScriptCore/bindings/objc/WebScriptObject.h
r13610 r14932 188 188 specified arguments. 189 189 @result Returns the result of calling the script method. 190 Returns WebUndefined when an exception is thrown in the script environment. 190 191 */ 191 192 - (id)callWebScriptMethod:(NSString *)name withArguments:(NSArray *)args; … … 197 198 of the script is dependent of the target script environment. 198 199 @result Returns the result of evaluating the script in the script environment. 200 Returns WebUndefined when an exception is thrown in the script environment. 199 201 */ 200 202 - (id)evaluateWebScript:(NSString *)script; … … 219 221 @param index The index of the property to return. Index based access is dependent 220 222 @discussion Gets the value of the property at the specified index. 221 @result The value of the property. 223 @result The value of the property. Returns WebUndefined when an exception is 224 thrown in the script environment. 222 225 */ 223 226 - (id)webScriptValueAtIndex:(unsigned int)index; -
trunk/JavaScriptCore/bindings/objc/WebScriptObject.mm
r14836 r14932 176 176 // Lookup the function object. 177 177 ExecState *exec = [self _executionContext]->interpreter()->globalExec(); 178 ASSERT(!exec->hadException()); 178 179 179 180 JSLock lock; … … 197 198 LOG_EXCEPTION (exec); 198 199 result = jsUndefined(); 200 exec->clearException(); 199 201 } 200 202 … … 216 218 217 219 ExecState *exec = [self _executionContext]->interpreter()->globalExec(); 220 ASSERT(!exec->hadException()); 221 218 222 JSValue *result; 219 220 223 JSLock lock; 221 224 … … 234 237 LOG_EXCEPTION (exec); 235 238 result = jsUndefined(); 239 exec->clearException(); 236 240 } 237 241 … … 252 256 253 257 ExecState *exec = [self _executionContext]->interpreter()->globalExec(); 258 ASSERT(!exec->hadException()); 254 259 255 260 JSLock lock; … … 259 264 if (exec->hadException()) { 260 265 LOG_EXCEPTION (exec); 266 exec->clearException(); 261 267 } 262 268 … … 273 279 274 280 ExecState *exec = [self _executionContext]->interpreter()->globalExec(); 281 ASSERT(!exec->hadException()); 275 282 276 283 JSLock lock; … … 281 288 LOG_EXCEPTION (exec); 282 289 result = jsUndefined(); 290 exec->clearException(); 283 291 } 284 292 … … 301 309 302 310 ExecState *exec = [self _executionContext]->interpreter()->globalExec(); 311 ASSERT(!exec->hadException()); 303 312 304 313 JSLock lock; … … 308 317 if (exec->hadException()) { 309 318 LOG_EXCEPTION (exec); 319 exec->clearException(); 310 320 } 311 321 … … 341 351 342 352 ExecState *exec = [self _executionContext]->interpreter()->globalExec(); 353 ASSERT(!exec->hadException()); 354 343 355 JSLock lock; 344 356 JSValue *result = [self _imp]->get (exec, (unsigned)index); … … 347 359 LOG_EXCEPTION (exec); 348 360 result = jsUndefined(); 361 exec->clearException(); 349 362 } 350 363 … … 365 378 366 379 ExecState *exec = [self _executionContext]->interpreter()->globalExec(); 380 ASSERT(!exec->hadException()); 381 367 382 JSLock lock; 368 383 [self _imp]->put (exec, (unsigned)index, (convertObjcValueToValue(exec, &value, ObjcObjectType))); … … 370 385 if (exec->hadException()) { 371 386 LOG_EXCEPTION (exec); 387 exec->clearException(); 372 388 } 373 389
Note:
See TracChangeset
for help on using the changeset viewer.