Changeset 60789 in webkit
- Timestamp:
- Jun 7, 2010 10:53:08 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r60788 r60789 1 2010-06-07 Andrei Popescu <andreip@google.com> 2 3 Reviewed by Jeremy Orlow. 4 5 run-bindings-tests results broken by Changeset 60776 6 https://bugs.webkit.org/show_bug.cgi?id=40230 7 8 The change to CodeGeneratorJS.pm in 9 http://trac.webkit.org/changeset/60776/trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm 10 added the possibility to use [CallWith=ScriptExecutionContext] in idl files. 11 12 Before the above change was submitted, CodeGeneratorJS.pm was modified so that native 13 functions return EncodedJSValue instead of JSValues. This was done in 14 http://trac.webkit.org/changeset/60631/trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm 15 16 This CL updates the CodeGeneratorJS.pm to correctly return an EncodedJSValue in the case 17 where the ScriptExecutionContext pointer is 0 at the time when the native function is invoked. 18 19 No new tests, just fixing run-bindings-tests. 20 21 * bindings/scripts/CodeGeneratorJS.pm: 22 * bindings/scripts/test/JS/JSTestObj.cpp: 23 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext): 24 * bindings/scripts/test/JS/JSTestObj.h: 25 1 26 2010-06-07 Kwang Yul Seo <skyul@company100.net> 2 27 -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r60776 r60789 1893 1893 push(@implContent, " ScriptExecutionContext* scriptContext = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();\n"); 1894 1894 push(@implContent, " if (!scriptContext)\n"); 1895 push(@implContent, " return jsUndefined();\n");1895 push(@implContent, " return JSValue::encode(jsUndefined());\n"); 1896 1896 $callWithArg = "scriptContext"; 1897 1897 } -
trunk/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r60776 r60789 761 761 } 762 762 763 764 763 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(ExecState* exec) 765 764 { 766 765 JSValue thisValue = exec->hostThisValue(); 767 766 if (!thisValue.inherits(&JSTestObj::s_info)) 768 return throw Error(exec, TypeError);767 return throwVMTypeError(exec); 769 768 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue)); 770 769 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 771 770 ScriptExecutionContext* scriptContext = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext(); 772 771 if (!scriptContext) 773 return jsUndefined();772 return JSValue::encode(jsUndefined()); 774 773 775 774 imp->withScriptExecutionContext(scriptContext); -
trunk/WebCore/bindings/scripts/test/JS/JSTestObj.h
r60776 r60789 116 116 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(JSC::ExecState*); 117 117 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(JSC::ExecState*); 118 119 118 // Attributes 120 119
Note: See TracChangeset
for help on using the changeset viewer.