Ignore:
Timestamp:
Jul 7, 2006, 7:25:55 PM (19 years ago)
Author:
ggaren
Message:

Reviewed by Maciej.


  • Standardized which functions take a JSContext as an argument. The rule is: if you might execute JavaScript, you take a JSContext, otherwise you don't.


The FIXME in JSObjectRef.h requires refactoring some parts of Interpreter,
but not API changes, so I'm putting it off until later.

  • API/JSCallbackObject.cpp: (KJS::JSCallbackObject::JSCallbackObject): (KJS::JSCallbackObject::init):
  • API/JSCallbackObject.h:
  • API/JSContextRef.cpp: (JSContextCreate):
  • API/JSContextRef.h:
  • API/JSObjectRef.cpp: (JSObjectMake): (JSPropertyEnumeratorGetNext):
  • API/JSObjectRef.h:
  • API/testapi.c: (MyObject_initialize): (main):
  • JavaScriptCore.exp:
  • kjs/array_object.cpp: (ArrayInstance::setLength): (ArrayInstance::pushUndefinedObjectsToEnd):
  • kjs/nodes.cpp: (ForInNode::execute):
  • kjs/reference.cpp: (KJS::Reference::getPropertyName): (KJS::Reference::getValue):
  • kjs/reference.h:
  • kjs/scope_chain.cpp: (KJS::ScopeChain::print):
File:
1 edited

Legend:

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

    r15224 r15225  
    5858@typedef JSInitializeCallback
    5959@abstract The callback invoked when an object is first created.
     60@param context The execution context to use.
    6061@param object The JSObject being created.
    6162@discussion If you named your function Initialize, you would declare it like this:
    6263
    63 void Initialize(JSObjectRef object);
    64 */
    65 
    66 // FIXME: Needs to take a context argument, but can't because no context exists when we're creating the global object
     64void Initialize(JSContextRef context, JSObjectRef object);
     65*/
    6766typedef void
    68 (*JSInitializeCallback)         (JSObjectRef object);
     67(*JSInitializeCallback)         (JSContextRef context, JSObjectRef object);
    6968
    7069/*!
     
    493492@function
    494493@abstract Gets a property enumerator's next property.
    495 @param context The execution context to use.
    496494@param enumerator The JSPropertyEnumerator whose next property you want to get.
    497495@result A JSStringBuffer containing the property's name, or NULL if all properties have been enumerated.
    498496*/
    499 JSStringBufferRef JSPropertyEnumeratorGetNext(JSContextRef context, JSPropertyEnumeratorRef enumerator);
     497JSStringBufferRef JSPropertyEnumeratorGetNext(JSPropertyEnumeratorRef enumerator);
    500498
    501499/*!
Note: See TracChangeset for help on using the changeset viewer.