From cd3262460c8c161084d08abacf6e524220bad006 Mon Sep 17 00:00:00 2001 From: "scr@chromium.org" Date: Thu, 16 Jun 2011 01:55:46 +0000 Subject: Use the ExecuteJavascriptInWebFrameNotifyResult to return results rather than domui. Also fixes the hanging issue by allowing result to returned always even when javascript to be executed is bogus. BUG=86074,85990 R=dtseng@chromium.org TEST=browser_tests --gtest_filter=WebUIBrowserTest.* Review URL: http://codereview.chromium.org/7146024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89286 0039d316-1c4b-4281-b951-d872f2087c98 --- content/renderer/render_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content/renderer') diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc index 2def6db..fc83a1d 100644 --- a/content/renderer/render_view.cc +++ b/content/renderer/render_view.cc @@ -3279,7 +3279,7 @@ void RenderView::EvaluateScript(const string16& frame_xpath, result = web_frame->executeScriptAndReturnValue(WebScriptSource(script)); if (notify_result) { ListValue list; - if (web_frame) { + if (!result.IsEmpty() && web_frame) { v8::HandleScope handle_scope; v8::Local context = web_frame->mainWorldScriptContext(); v8::Context::Scope context_scope(context); -- cgit v1.1