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

Unified Diff: Source/core/dom/ProcessingInstruction.cpp

Issue 738443003: Have ProcessingInstruction's XSLT event listener keep a weak backreference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: Source/core/dom/ProcessingInstruction.cpp
diff --git a/Source/core/dom/ProcessingInstruction.cpp b/Source/core/dom/ProcessingInstruction.cpp
index 1459449179d1f40f08a7bb9da07274463f9812cd..5da61fb6da2346a01583b39d6f5a4e2139172f60 100644
--- a/Source/core/dom/ProcessingInstruction.cpp
+++ b/Source/core/dom/ProcessingInstruction.cpp
@@ -67,6 +67,24 @@ ProcessingInstruction::~ProcessingInstruction()
if (inDocument() && m_isCSS)
document().styleEngine()->removeStyleSheetCandidateNode(this);
#endif
+ if (m_listenerForXSLT)
haraken 2014/11/24 01:17:00 We can call clearEventListenerForXSLT().
sof 2014/11/24 06:15:39 Yes, done.
+ m_listenerForXSLT->detach();
+}
+
+EventListener* ProcessingInstruction::eventListenerForXSLT()
+{
+ if (!m_listenerForXSLT)
+ return 0;
+
+ return m_listenerForXSLT->toEventListener();
+}
+
+void ProcessingInstruction::clearEventListenerForXSLT()
+{
+ if (m_listenerForXSLT) {
+ m_listenerForXSLT->detach();
+ m_listenerForXSLT.clear();
+ }
}
String ProcessingInstruction::nodeName() const

Powered by Google App Engine
This is Rietveld 408576698