Changeset 15212 in webkit for trunk/JavaScriptCore


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:
Location:
trunk/JavaScriptCore
Files:
3 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) {
  • trunk/JavaScriptCore/API/JSContextRef.h

    r15168 r15212  
    5050  @param context            execution context to use
    5151  @param script             a character buffer containing the JavaScript to evaluate
    52   @param thisValue          object to use as "this," or NULL to use the global object as "this"
     52  @param thisObject         the object to use as "this," or NULL to use the global object as "this."
    5353  @param sourceURL          URL to the file containing the JavaScript, or NULL - this is only used for error reporting
    5454  @param startingLineNumber the JavaScript's starting line number in the file located at sourceURL - this is only used for error reporting
     
    5656  @result                   result of evaluation, or NULL if an uncaught exception was thrown
    5757*/
    58 JSValueRef JSEvaluate(JSContextRef context, JSStringBufferRef script, JSValueRef thisValue, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception);
     58JSValueRef JSEvaluate(JSContextRef context, JSStringBufferRef script, JSObjectRef thisObject, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception);
    5959
    6060/*!
  • trunk/JavaScriptCore/ChangeLog

    r15211 r15212  
     12006-07-07  Geoffrey Garen  <[email protected]>
     2
     3        Reviewed by John, mocked by Darin.
     4       
     5        - Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as
     6        "this," since "this" must be an object.
     7
     8        * API/JSContextRef.cpp:
     9        (JSEvaluate):
     10        * API/JSContextRef.h:
     11
    1122006-07-07  Geoffrey Garen  <[email protected]>
    213
Note: See TracChangeset for help on using the changeset viewer.