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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8EventListener.h

Issue 1472823002: Couple V8AbstractEventListener's lifetime to the V8 listeners lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 1 month 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: third_party/WebKit/Source/bindings/core/v8/V8EventListener.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8EventListener.h b/third_party/WebKit/Source/bindings/core/v8/V8EventListener.h
index a9a00b4ffc118747baf2c117cfda39be0525575d..5b6423df9ccfeec6f3ff6a90cfe4f9d5f97c7d3e 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8EventListener.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8EventListener.h
@@ -45,11 +45,13 @@ class V8EventListener : public V8AbstractEventListener {
public:
static PassRefPtrWillBeRawPtr<V8EventListener> create(v8::Local<v8::Object> listener, bool isAttribute, ScriptState* scriptState)
{
- return adoptRefWillBeNoop(new V8EventListener(listener, isAttribute, scriptState));
+ RefPtrWillBeRawPtr<V8EventListener> eventListener = adoptRefWillBeNoop(new V8EventListener(isAttribute, scriptState));
+ eventListener->setListenerObject(listener);
+ return eventListener.release();
}
protected:
- V8EventListener(v8::Local<v8::Object> listener, bool isAttribute, ScriptState*);
+ V8EventListener(bool isAttribute, ScriptState*);
v8::Local<v8::Function> getListenerFunction(ScriptState*);
v8::Local<v8::Value> callListenerFunction(ScriptState*, v8::Local<v8::Value>, Event*) override;
};

Powered by Google App Engine
This is Rietveld 408576698