Changeset 15212 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 7, 2006, 1:39:38 PM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSContextRef.cpp
r15168 r15212 72 72 } 73 73 74 JSValueRef JSEvaluate(JSContextRef context, JSStringBufferRef script, JS ValueRef thisValue, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception)74 JSValueRef JSEvaluate(JSContextRef context, JSStringBufferRef script, JSObjectRef thisObject, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception) 75 75 { 76 76 JSLock lock; 77 77 ExecState* exec = toJS(context); 78 JS Value* jsThisValue = toJS(thisValue);78 JSObject* jsThisObject = toJS(thisObject); 79 79 UString::Rep* scriptRep = toJS(script); 80 80 UString::Rep* sourceURLRep = toJS(sourceURL); 81 // Interpreter::evaluate sets thisValueto the global object if it is NULL82 Completion completion = exec->dynamicInterpreter()->evaluate(UString(sourceURLRep), startingLineNumber, UString(scriptRep), jsThis Value);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); 83 83 84 84 if (completion.complType() == Throw) { -
trunk/JavaScriptCore/API/JSContextRef.h
r15168 r15212 50 50 @param context execution context to use 51 51 @param script a character buffer containing the JavaScript to evaluate 52 @param this Value 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." 53 53 @param sourceURL URL to the file containing the JavaScript, or NULL - this is only used for error reporting 54 54 @param startingLineNumber the JavaScript's starting line number in the file located at sourceURL - this is only used for error reporting … … 56 56 @result result of evaluation, or NULL if an uncaught exception was thrown 57 57 */ 58 JSValueRef JSEvaluate(JSContextRef context, JSStringBufferRef script, JS ValueRef thisValue, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception);58 JSValueRef JSEvaluate(JSContextRef context, JSStringBufferRef script, JSObjectRef thisObject, JSStringBufferRef sourceURL, int startingLineNumber, JSValueRef* exception); 59 59 60 60 /*! -
trunk/JavaScriptCore/ChangeLog
r15211 r15212 1 2006-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 1 12 2006-07-07 Geoffrey Garen <[email protected]> 2 13
Note:
See TracChangeset
for help on using the changeset viewer.