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

Unified Diff: extensions/renderer/script_context.cc

Issue 399363002: Add support for writing unit tests for Mojo-backed apps/extensions APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/resources/test_custom_bindings.js ('k') | extensions/test/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index 0f40f9a4834279424048602849e1f393bf57a5c3..97e6c763be0fd1b3f3ecfea237e437f6a1ae782c 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -121,6 +121,8 @@ void ScriptContext::DispatchEvent(const char* event_name,
}
void ScriptContext::DispatchOnUnloadEvent() {
+ v8::HandleScope handle_scope(isolate());
+ v8::Context::Scope context_scope(v8_context());
module_system_->CallModuleMethod("unload_event", "dispatch");
}
« no previous file with comments | « extensions/renderer/resources/test_custom_bindings.js ('k') | extensions/test/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698