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

Unified Diff: chrome/renderer/extensions/app_bindings.cc

Issue 12853007: Don't throw exceptions when v8 objects/contexts are missing, and catch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable test #2 Created 7 years, 9 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/chrome_renderer.gypi ('k') | chrome/renderer/extensions/console.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/app_bindings.cc
diff --git a/chrome/renderer/extensions/app_bindings.cc b/chrome/renderer/extensions/app_bindings.cc
index 2932053a45933948d3159cd53ee806ec2d861798..b036bb230662d19054190de98ed067c8dfa9bb02 100644
--- a/chrome/renderer/extensions/app_bindings.cc
+++ b/chrome/renderer/extensions/app_bindings.cc
@@ -14,6 +14,7 @@
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/renderer/extensions/chrome_v8_context.h"
+#include "chrome/renderer/extensions/console.h"
#include "chrome/renderer/extensions/dispatcher.h"
#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/v8_value_converter.h"
@@ -106,8 +107,9 @@ v8::Handle<v8::Value> AppBindings::GetDetailsForFrame(
WebFrame* target_frame = WebFrame::frameForContext(context);
if (!target_frame) {
- return v8::ThrowException(
- v8::String::New("Could not find frame for specified object."));
+ console::Error(v8::Context::GetCalling(),
+ "Could not find frame for specified object.");
+ return v8::Undefined();
}
return GetDetailsForFrameImpl(target_frame);
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/extensions/console.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698