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

Unified Diff: chrome/renderer/extensions/object_backed_native_handler.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
Index: chrome/renderer/extensions/object_backed_native_handler.cc
diff --git a/chrome/renderer/extensions/object_backed_native_handler.cc b/chrome/renderer/extensions/object_backed_native_handler.cc
index 9ac08acd168da5d342c2ce7e880a8e349f1b10b4..65903c2a971882a9e7bed1725635c58c2a912c8c 100644
--- a/chrome/renderer/extensions/object_backed_native_handler.cc
+++ b/chrome/renderer/extensions/object_backed_native_handler.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/memory/linked_ptr.h"
+#include "chrome/renderer/extensions/console.h"
#include "chrome/renderer/extensions/module_system.h"
#include "v8/include/v8.h"
@@ -41,8 +42,9 @@ v8::Handle<v8::Value> ObjectBackedNativeHandler::Router(
// See comment in header file for why we do this.
if (handler_function_value.IsEmpty() ||
handler_function_value->IsUndefined()) {
- return v8::ThrowException(v8::String::New(
- "Extension view no longer exists"));
+ console::Error(v8::Context::GetCalling(),
+ "Extension view no longer exists");
+ return v8::Undefined();
}
DCHECK(handler_function_value->IsExternal());
return handle_scope.Close(static_cast<HandlerFunction*>(
« no previous file with comments | « chrome/renderer/extensions/module_system.cc ('k') | chrome/test/data/extensions/api_test/crazy_extension/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698