Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: content/renderer/render_view.cc

Issue 7146024: Use ExecuteJavascriptInWebFrameNotifyResult to return results even in error condition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't check against |this| in the destructor, which doesn't compile on Win. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/webui/test_api.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view.cc
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index 2def6db25e21015eacc0404d9c62a793d4ac0bcf..fc83a1daef2e9c2a2da665225f231880f3672ff5 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<v8::Context> context = web_frame->mainWorldScriptContext();
v8::Context::Scope context_scope(context);
« no previous file with comments | « chrome/test/data/webui/test_api.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698