Ignore:
Timestamp:
Jun 25, 2006, 8:12:18 PM (19 years ago)
Author:
ggaren
Message:

Reviewed by Adele.


  • Added JSConstructorMake to match JSFunctionMake, along with test code.


[ I checked in the ChangeLog before without the actual files. ]

  • API/JSObjectRef.cpp: (JSConstructorMake):
  • API/JSObjectRef.h:
  • API/testapi.c: (myConstructor_callAsConstructor): (main):
  • API/testapi.js:
  • ChangeLog:
  • JavaScriptCore.xcodeproj/project.pbxproj: Moved testapi.c to the testapi target -- this was an oversight in my earlier check-in.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSObjectRef.cpp

    r14986 r15043  
    7777}
    7878
     79JSObjectRef JSConstructorMake(JSContextRef context, JSCallAsConstructorCallback callback)
     80{
     81    ExecState* exec = toJS(context);
     82    JSObjectCallbacks callbacks = kJSObjectCallbacksNone;
     83    callbacks.callAsConstructor = callback;
     84   
     85    return JSObjectMake(context, &callbacks, toRef(exec->lexicalInterpreter()->builtinObjectPrototype()));
     86}
     87
    7988JSCharBufferRef JSObjectGetDescription(JSObjectRef object)
    8089{
Note: See TracChangeset for help on using the changeset viewer.