Changeset 31350 in webkit for trunk/JavaScriptCore/API/testapi.js


Ignore:
Timestamp:
Mar 26, 2008, 8:35:40 PM (17 years ago)
Author:
Adam Roben
Message:

Fix Bug 18060: Assertion failure (JSLock not held) beneath JSCallbackObject<Base>::toString

<http://bugs.webkit.org/show_bug.cgi?id=18060>

Reviewed by Geoff Garen.

Bug fix:

  • API/JSCallbackObjectFunctions.h: (KJS::JSCallbackObject<Base>::toString): Make the DropAllLocks instance only be in scope while calling convertToType.

Test:

  • API/testapi.c: (MyObject_convertToType): Implement type conversion to string.
  • API/testapi.js: Add a test for type conversion to string.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/testapi.js

    r28884 r31350  
    101101shouldBe("+MyObject", 1); // toNumber
    102102shouldBe("(MyObject.toString())", "[object MyObject]"); // toString
     103shouldBe("String(MyObject)", "MyObjectAsString"); // type conversion to string
    103104shouldBe("MyObject - 0", NaN); // toPrimitive
    104105
Note: See TracChangeset for help on using the changeset viewer.