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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp

Issue 1472823002: Couple V8AbstractEventListener's lifetime to the V8 listeners lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ignore self refs 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/V8LazyEventListener.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
index d5a989d40b9c93a045ef184376ab7e9cde65df35..0c7028d45c5a48374d6d068394d2b1d9197e2082 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
@@ -128,7 +128,8 @@ void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionConte
return;
if (!toDocument(executionContext)->allowInlineEventHandlers(m_node, this, m_sourceURL, m_position.m_line)) {
- clearListenerObject();
+ if (hasExistingListenerObject())
+ clearListenerObject();
return;
}
@@ -203,7 +204,7 @@ void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionConte
// m_code = String();
// m_eventParameterName = String();
// m_sourceURL = String();
- setListenerObject(wrappedFunction, scriptState);
+ setListenerObject(wrappedFunction);
}
void V8LazyEventListener::fireErrorEvent(v8::Local<v8::Context> v8Context, ExecutionContext* executionContext, v8::Local<v8::Message> message)

Powered by Google App Engine
This is Rietveld 408576698