Changeset 116927 in webkit
- Timestamp:
- May 14, 2012 12:49:59 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116924 r116927 1 2012-05-14 MORITA Hajime <morrita@google.com> 2 3 Should have Node::inDetach() for assertion purposes. 4 https://bugs.webkit.org/show_bug.cgi?id=86157 5 6 Reviewed by Darin Adler. 7 8 Implemented Node::inDetach() and added an assertio in Document::setFocusedNode(). 9 This is a follow up of r116644 which removes inDetach() checking. 10 11 No new tests. Just adding an asssertion. 12 13 * dom/Document.cpp: 14 (WebCore::Document::setFocusedNode): 15 * dom/Node.cpp: 16 (WebCore): 17 (WebCore::Node::inDetach): 18 (WebCore::Node::detach): 19 * dom/Node.h: 20 (Node): 21 1 22 2012-05-13 Noel Gordon <noel.gordon@gmail.com> 2 23 -
trunk/Source/WebCore/dom/Document.cpp
r116798 r116927 3656 3656 // Remove focus from the existing focus node (if any) 3657 3657 if (oldFocusedNode) { 3658 ASSERT(!oldFocusedNode->inDetach()); 3659 3658 3660 if (oldFocusedNode->active()) 3659 3661 oldFocusedNode->setActive(false); -
trunk/Source/WebCore/dom/Node.cpp
r116814 r116927 1340 1340 } 1341 1341 1342 #ifndef NDEBUG 1343 static Node* detachingNode; 1344 1345 bool Node::inDetach() const 1346 { 1347 return detachingNode == this; 1348 } 1349 #endif 1350 1342 1351 void Node::detach() 1343 1352 { 1353 #ifndef NDEBUG 1354 ASSERT(!detachingNode); 1355 detachingNode = this; 1356 #endif 1357 1344 1358 if (renderer()) 1345 1359 renderer()->destroyAndCleanupAnonymousWrappers(); … … 1356 1370 clearFlag(InActiveChainFlag); 1357 1371 clearFlag(IsAttachedFlag); 1372 1373 #ifndef NDEBUG 1374 detachingNode = 0; 1375 #endif 1358 1376 } 1359 1377 -
trunk/Source/WebCore/dom/Node.h
r116798 r116927 497 497 virtual void detach(); 498 498 499 #ifndef NDEBUG 500 bool inDetach() const; 501 #endif 502 499 503 void reattach(); 500 504 void reattachIfAttached();
Note: See TracChangeset
for help on using the changeset viewer.