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

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: Rename ProcessingInstruction local interface class 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
« no previous file with comments | « Source/core/dom/ProcessingInstruction.h ('k') | Source/core/xml/DocumentXSLT.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ProcessingInstruction.cpp
diff --git a/Source/core/dom/ProcessingInstruction.cpp b/Source/core/dom/ProcessingInstruction.cpp
index 1459449179d1f40f08a7bb9da07274463f9812cd..c3d42a1d562ad10facd600809d079c7df4bafa40 100644
--- a/Source/core/dom/ProcessingInstruction.cpp
+++ b/Source/core/dom/ProcessingInstruction.cpp
@@ -67,6 +67,23 @@ ProcessingInstruction::~ProcessingInstruction()
if (inDocument() && m_isCSS)
document().styleEngine()->removeStyleSheetCandidateNode(this);
#endif
+ clearEventListenerForXSLT();
+}
+
+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
« no previous file with comments | « Source/core/dom/ProcessingInstruction.h ('k') | Source/core/xml/DocumentXSLT.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698