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

Unified Diff: extensions/renderer/module_system.cc

Issue 2819683002: [Extenisons Bindings] Don't throw unchecked errors; add console errors (Closed)
Patch Set: jbroman's Created 3 years, 8 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: extensions/renderer/module_system.cc
diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc
index bbc96f3feca40ce502f6ea03309cd4be9ac24b85..a1bb509856308df7c580311a658e400f5e556f7c 100644
--- a/extensions/renderer/module_system.cc
+++ b/extensions/renderer/module_system.cc
@@ -61,20 +61,19 @@ void Fatal(ScriptContext* context, const std::string& message) {
ExtensionsClient* client = ExtensionsClient::Get();
if (client->ShouldSuppressFatalErrors()) {
- console::AddMessage(context->GetRenderFrame(),
- content::CONSOLE_MESSAGE_LEVEL_ERROR, full_message);
+ console::AddMessage(context, content::CONSOLE_MESSAGE_LEVEL_ERROR,
+ full_message);
client->RecordDidSuppressFatalError();
} else {
- console::Fatal(context->GetRenderFrame(), full_message);
+ console::Fatal(context, full_message);
}
}
void Warn(v8::Isolate* isolate, const std::string& message) {
ScriptContext* script_context =
ScriptContextSet::GetContextByV8Context(isolate->GetCurrentContext());
- console::AddMessage(
- script_context ? script_context->GetRenderFrame() : nullptr,
- content::CONSOLE_MESSAGE_LEVEL_WARNING, message);
+ console::AddMessage(script_context, content::CONSOLE_MESSAGE_LEVEL_WARNING,
+ message);
}
// Default exception handler which logs the exception.
« no previous file with comments | « extensions/renderer/declarative_event_unittest.cc ('k') | extensions/renderer/native_extension_bindings_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698