Changeset 15481 in webkit for trunk/JavaScriptCore/API/JSBase.cpp


Ignore:
Timestamp:
Jul 17, 2006, 1:14:39 AM (19 years ago)
Author:
mjs
Message:

Reviewed by Geoff.


  • add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations; except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors.


Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive
but usually uninteresting parameter.

  • API/JSBase.cpp: (JSEvaluateScript): (JSCheckScriptSyntax): (JSGarbageCollect):
  • API/JSBase.h:
  • API/JSCallbackObject.cpp: (KJS::JSCallbackObject::JSCallbackObject): (KJS::JSCallbackObject::init): (KJS::JSCallbackObject::getOwnPropertySlot): (KJS::JSCallbackObject::put): (KJS::JSCallbackObject::deleteProperty): (KJS::JSCallbackObject::toNumber): (KJS::JSCallbackObject::toString):
  • API/JSContextRef.cpp: (JSGlobalContextCreate): (JSGlobalContextRetain): (JSGlobalContextRelease): (JSContextGetGlobalObject):
  • API/JSContextRef.h:
  • API/JSNode.c: (JSNodePrototype_appendChild): (JSNodePrototype_removeChild): (JSNodePrototype_replaceChild): (JSNode_getNodeType): (JSNode_getFirstChild): (JSNode_prototype):
  • API/JSNodeList.c: (JSNodeListPrototype_item): (JSNodeList_length): (JSNodeList_getProperty): (JSNodeList_prototype):
  • API/JSObjectRef.cpp: (JSObjectMake): (JSObjectMakeFunctionWithCallback): (JSObjectMakeConstructor): (JSObjectMakeFunction): (JSObjectGetPrototype): (JSObjectSetPrototype): (JSObjectHasProperty): (JSObjectGetProperty): (JSObjectSetProperty): (JSObjectGetPropertyAtIndex): (JSObjectSetPropertyAtIndex): (JSObjectDeleteProperty): (JSObjectIsFunction): (JSObjectCallAsFunction): (JSObjectIsConstructor): (JSObjectCallAsConstructor): (JSObjectCopyPropertyNames):
  • API/JSObjectRef.h:
  • API/JSStringRef.cpp:
  • API/JSValueRef.cpp: (JSValueGetType): (JSValueIsUndefined): (JSValueIsNull): (JSValueIsBoolean): (JSValueIsNumber): (JSValueIsString): (JSValueIsObject): (JSValueIsObjectOfClass): (JSValueIsEqual): (JSValueIsStrictEqual): (JSValueIsInstanceOfConstructor): (JSValueMakeUndefined): (JSValueMakeNull): (JSValueMakeBoolean): (JSValueMakeNumber): (JSValueMakeString): (JSValueToBoolean): (JSValueToNumber): (JSValueToStringCopy): (JSValueToObject): (JSValueProtect): (JSValueUnprotect):
  • API/JSValueRef.h:
  • API/minidom.c: (print):
  • API/testapi.c: (MyObject_getProperty): (MyObject_deleteProperty): (MyObject_callAsFunction): (MyObject_callAsConstructor): (MyObject_convertToType): (print_callAsFunction): (main):
File:
1 edited

Legend:

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

    r15445 r15481  
    3636using namespace KJS;
    3737
    38 JSValueRef JSEvaluateScript(JSContextRef context, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
     38JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
    3939{
    4040    JSLock lock;
    41     ExecState* exec = toJS(context);
     41    ExecState* exec = toJS(ctx);
    4242    JSObject* jsThisObject = toJS(thisObject);
    4343    UString::Rep* scriptRep = toJS(script);
     
    5959}
    6060
    61 bool JSCheckScriptSyntax(JSContextRef context, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
     61bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
    6262{
    6363    JSLock lock;
    6464
    65     ExecState* exec = toJS(context);
     65    ExecState* exec = toJS(ctx);
    6666    UString::Rep* scriptRep = toJS(script);
    6767    UString::Rep* sourceURLRep = toJS(sourceURL);
     
    7676}
    7777
    78 void JSGarbageCollect()
     78void JSGarbageCollect(JSContextRef)
    7979{
    8080    JSLock lock;
Note: See TracChangeset for help on using the changeset viewer.