Index: extensions/renderer/api_event_handler.h |
diff --git a/extensions/renderer/api_event_handler.h b/extensions/renderer/api_event_handler.h |
index fbf9b42a7ea742f1accc48e10775af037a6b8e0b..a06f3fddc637147475b165e3b5b6063822d00f18 100644 |
--- a/extensions/renderer/api_event_handler.h |
+++ b/extensions/renderer/api_event_handler.h |
@@ -48,6 +48,11 @@ class APIEventHandler { |
size_t GetNumEventListenersForTesting(const std::string& event_name, |
v8::Local<v8::Context> context); |
+ // Invalidates listeners for the given |context|. It's a shame we have to |
+ // have this separately (as opposed to hooking into e.g. a PerContextData |
+ // destructor), but we need to do this before the context is fully removed. |
jbroman
2017/03/01 17:49:47
Because it's gone from the ScriptContextSet, right
Devlin
2017/03/01 19:03:50
Correct (and the ScriptContext wrapper is deleted)
|
+ void InvalidateContext(v8::Local<v8::Context> context); |
+ |
private: |
// Method to run a given v8::Function. Curried in for testing. |
binding::RunJSFunction call_js_; |