Changeset 214702 in webkit
- Timestamp:
- Mar 31, 2017, 5:10:59 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r214700 r214702 1 2017-03-31 Simon Fraser <simon.fraser@apple.com> 2 3 When destroying a Node, assert that it's been removed from all the touch handler maps 4 https://bugs.webkit.org/show_bug.cgi?id=170363 5 rdar://problem/31377469 6 7 Reviewed by Tim Horton. 8 9 Assert that the Node has been removed from the touch handler maps in all documents on destruction. 10 11 * dom/Document.h: 12 (WebCore::Document::hasTouchEventHandlers): 13 (WebCore::Document::touchEventTargetsContain): 14 * dom/Node.cpp: 15 (WebCore::Node::~Node): 16 1 17 2017-03-31 Alexey Proskuryakov <ap@apple.com> 2 18 -
TabularUnified trunk/Source/WebCore/dom/Document.h ¶
r214435 r214702 1146 1146 void updateLastHandledUserGestureTimestamp(); 1147 1147 1148 #if ENABLE(TOUCH_EVENTS)1149 bool hasTouchEventHandlers() const { return (m_touchEventTargets.get()) ? m_touchEventTargets->size() : false; }1150 #else1151 bool hasTouchEventHandlers() const { return false; }1152 #endif1153 1154 1148 // Used for testing. Count handlers in the main document, and one per frame which contains handlers. 1155 1149 WEBCORE_EXPORT unsigned wheelEventHandlerCount() const; … … 1158 1152 WEBCORE_EXPORT void startTrackingStyleRecalcs(); 1159 1153 WEBCORE_EXPORT unsigned styleRecalcCount() const; 1154 1155 #if ENABLE(TOUCH_EVENTS) 1156 bool hasTouchEventHandlers() const { return (m_touchEventTargets.get()) ? m_touchEventTargets->size() : false; } 1157 bool touchEventTargetsContain(Node& node) const { return m_touchEventTargets ? m_touchEventTargets->contains(&node) : false; } 1158 #else 1159 bool hasTouchEventHandlers() const { return false; } 1160 bool touchEventTargetsContain(Node&) const { return false; } 1161 #endif 1160 1162 1161 1163 void didAddTouchEventHandler(Node&); -
TabularUnified trunk/Source/WebCore/dom/Node.cpp ¶
r214649 r214702 302 302 303 303 document().decrementReferencingNodeCount(); 304 305 #if ENABLE(TOUCH_EVENTS) && PLATFORM(IOS) && (!ASSERT_DISABLED || ENABLE(SECURITY_ASSERTIONS)) 306 for (auto* document : Document::allDocuments()) { 307 ASSERT_WITH_SECURITY_IMPLICATION(!document->touchEventListenersContain(*this)); 308 ASSERT_WITH_SECURITY_IMPLICATION(!document->touchEventHandlersContain(*this)); 309 ASSERT_WITH_SECURITY_IMPLICATION(!document->touchEventTargetsContain(*this)); 310 } 311 #endif 304 312 } 305 313
Note:
See TracChangeset
for help on using the changeset viewer.