Return value from executed script in Chromium.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 01:10:25 +0000 (01:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 01:10:25 +0000 (01:10 +0000)
commit3630fdd2186ea1aadf4e07cf494dfb2e863dbb1b
treedbfa36c70abe410c09f1b74633264a63cb288ee0
parentf4bd482f561c37c7419a310b4a310f51a549b970
Return value from executed script in Chromium.
https://bugs.webkit.org/show_bug.cgi?id=79851

Patch by Eriq Augustine <eaugusti@chromium.org> on 2012-04-23
Reviewed by Adam Barth.

Source/WebCore:

Providing a varaiant of evaluateScriptInIsolatedWorld that
returns the value of the evaluated script.

Test: platform/chromium/http/tests/misc/execute-and-return-value.html

* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::evaluateInIsolatedWorld):
* bindings/v8/ScriptController.h:
(ScriptController):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::evaluateInIsolatedWorld):
* bindings/v8/V8Proxy.h:
(V8Proxy):

Source/WebKit/chromium:

Providing a variant of evaluateScriptInIsolatedWorld that
returns the value of the evaluated script.

* public/WebFrame.h:
(WebFrame):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::executeScriptInIsolatedWorldAndReturnValues):
(WebKit):
* src/WebFrameImpl.h:
(WebKit):
(WebFrameImpl):

Tools:

Adding a function to LayoutTestController that evaluates a script in
an isolated wold an returns the result of the evaluation.

* DumpRenderTree/LayoutTestController.cpp:
(evaluateScriptInIsolatedWorldAndReturnValue):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
(LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue):
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::setXSSAuditorEnabled):
(LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue):
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
(LayoutTestController):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue):

LayoutTests:

Testing executing a script and getting the result of that script.

* platform/chromium/http/tests/misc/execute-and-return-value-expected.txt: Added.
* platform/chromium/http/tests/misc/execute-and-return-value.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@114974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium/http/tests/misc/execute-and-return-value-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/http/tests/misc/execute-and-return-value.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/ScriptController.cpp
Source/WebCore/bindings/v8/ScriptController.h
Source/WebCore/bindings/v8/V8Proxy.cpp
Source/WebCore/bindings/v8/V8Proxy.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebFrame.h
Source/WebKit/chromium/src/WebFrameImpl.cpp
Source/WebKit/chromium/src/WebFrameImpl.h
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp