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

Unified Diff: extensions/renderer/api_bindings_system.cc

Issue 2722463006: [Extensions Bindings] Notify of event unregistration on invalidation (Closed)
Patch Set: . Created 3 years, 10 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/api_bindings_system.cc
diff --git a/extensions/renderer/api_bindings_system.cc b/extensions/renderer/api_bindings_system.cc
index fab9fe83ce96f6ea7e64304fb6989b6bd3b43e86..10f20851335341463483647cacdf842d86c576b1 100644
--- a/extensions/renderer/api_bindings_system.cc
+++ b/extensions/renderer/api_bindings_system.cc
@@ -124,6 +124,10 @@ void APIBindingsSystem::RegisterCustomType(const std::string& type_name,
custom_types_[type_name] = function;
}
+void APIBindingsSystem::WillReleaseContext(v8::Local<v8::Context> context) {
+ event_handler_.InvalidateContext(context);
+}
+
v8::Local<v8::Object> APIBindingsSystem::CreateCustomType(
v8::Local<v8::Context> context,
const std::string& type_name,

Powered by Google App Engine
This is Rietveld 408576698