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


Ignore:
Timestamp:
Jul 12, 2006, 2:55:55 AM (19 years ago)
Author:
mjs
Message:

4eviewed by Geoff.


  • add handling of hasInstance callback for API objects
  • API/JSCallbackObject.cpp: (KJS::JSCallbackObject::implementsHasInstance): Check if callback is present. (KJS::JSCallbackObject::hasInstance): Invoke appropriate callback.
  • API/JSCallbackObject.h:
  • API/JSClassRef.cpp:
  • API/JSObjectRef.h:
  • API/testapi.c: (MyObject_hasInstance): Test case; should match what construct would do.
  • API/testapi.js:
File:
1 edited

Legend:

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

    r15133 r15384  
    8282shouldBe("typeof constructedObject", "object");
    8383shouldBe("constructedObject.value", 1);
     84shouldBe("(new MyObject()) instanceof MyObject", true);
     85shouldBe("(new Object()) instanceof MyObject", false);
Note: See TracChangeset for help on using the changeset viewer.