Ignore:
Timestamp:
Jul 7, 2006, 1:39:38 PM (19 years ago)
Author:
ggaren
Message:

Reviewed by John, mocked by Darin.


  • Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as "this," since "this" must be an object.
  • API/JSContextRef.cpp: (JSEvaluate):
  • API/JSContextRef.h:
File:
1 edited

Legend:

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

    r15168 r15212  
    7272}
    7373
    74 JSValueRef JSEvaluate(JSContextRef context, JSStringBufferRef script, JSValueRef thisValue, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception)
     74JSValueRef JSEvaluate(JSContextRef context, JSStringBufferRef script, JSObjectRef thisObject, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception)
    7575{
    7676    JSLock lock;
    7777    ExecState* exec = toJS(context);
    78     JSValue* jsThisValue = toJS(thisValue);
     78    JSObject* jsThisObject = toJS(thisObject);
    7979    UString::Rep* scriptRep = toJS(script);
    8080    UString::Rep* sourceURLRep = toJS(sourceURL);
    81     // Interpreter::evaluate sets thisValue to the global object if it is NULL
    82     Completion completion = exec->dynamicInterpreter()->evaluate(UString(sourceURLRep), startingLineNumber, UString(scriptRep), jsThisValue);
     81    // Interpreter::evaluate sets "this" to the global object if it is NULL
     82    Completion completion = exec->dynamicInterpreter()->evaluate(UString(sourceURLRep), startingLineNumber, UString(scriptRep), jsThisObject);
    8383
    8484    if (completion.complType() == Throw) {
Note: See TracChangeset for help on using the changeset viewer.