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

Unified Diff: extensions/renderer/object_backed_native_handler.cc

Issue 1200503002: [Extensions] Kill off ExtensionMsg_AddMessageToConsole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 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 | « extensions/renderer/module_system.cc ('k') | extensions/renderer/script_context_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/object_backed_native_handler.cc
diff --git a/extensions/renderer/object_backed_native_handler.cc b/extensions/renderer/object_backed_native_handler.cc
index b88bf32ca4cb291c6d5cfe86a09732f229e23d67..060606b6703797c20b918a6604fdd9c5dd1c4111 100644
--- a/extensions/renderer/object_backed_native_handler.cc
+++ b/extensions/renderer/object_backed_native_handler.cc
@@ -9,6 +9,7 @@
#include "extensions/renderer/console.h"
#include "extensions/renderer/module_system.h"
#include "extensions/renderer/script_context.h"
+#include "extensions/renderer/script_context_set.h"
#include "v8/include/v8.h"
namespace extensions {
@@ -44,7 +45,9 @@ void ObjectBackedNativeHandler::Router(
// See comment in header file for why we do this.
if (handler_function_value.IsEmpty() ||
handler_function_value->IsUndefined()) {
- console::Error(args.GetIsolate()->GetCallingContext(),
+ ScriptContext* script_context = ScriptContextSet::GetContextByV8Context(
+ args.GetIsolate()->GetCallingContext());
+ console::Error(script_context ? script_context->GetRenderFrame() : nullptr,
"Extension view no longer exists");
return;
}
« no previous file with comments | « extensions/renderer/module_system.cc ('k') | extensions/renderer/script_context_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698