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

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

Issue 2190553003: binding: Compiles event handlers only once at most. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a lot of things. Created 4 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
Index: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h
index 019b9e1d1215f5678c07919d683c4d77b71d0ba9..8ab2979f1fb6da9e58bc2e2e92365aa861666414 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h
@@ -85,8 +85,7 @@ public:
// even if the user script is not compilable.
v8::Local<v8::Object> getListenerObject(ExecutionContext* executionContext)
{
- prepareListenerObject(executionContext);
- return m_listener.newLocal(m_isolate);
+ return getListenerObjectInternal(executionContext);
}
v8::Local<v8::Object> getExistingListenerObject()
@@ -119,7 +118,10 @@ public:
protected:
V8AbstractEventListener(bool isAttribute, DOMWrapperWorld&, v8::Isolate*);
- virtual void prepareListenerObject(ExecutionContext*) { }
+ virtual v8::Local<v8::Object> getListenerObjectInternal(ExecutionContext* executionContext)
+ {
+ return getExistingListenerObject();
+ }
void setListenerObject(v8::Local<v8::Object>);

Powered by Google App Engine
This is Rietveld 408576698