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

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

Issue 1175173002: Simplify inDetach() assert and make it stronger. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 5 years, 6 months 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 | « no previous file | Source/core/dom/DocumentLifecycle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index dbaa407a1620088bd0df18db7a3ed7ce615d892f..770524fd52e9b5655e3be6c233914a6481137d15 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3425,6 +3425,8 @@ void Document::setAnnotatedRegions(const Vector<AnnotatedRegionValue>& regions)
bool Document::setFocusedElement(PassRefPtrWillBeRawPtr<Element> prpNewFocusedElement, WebFocusType type)
{
+ ASSERT(!m_lifecycle.inDetach());
+
m_clearFocusedElementTimer.stop();
RefPtrWillBeRawPtr<Element> newFocusedElement = prpNewFocusedElement;
@@ -3445,8 +3447,6 @@ bool Document::setFocusedElement(PassRefPtrWillBeRawPtr<Element> prpNewFocusedEl
// Remove focus from the existing focus node (if any)
if (oldFocusedElement) {
- ASSERT(!oldFocusedElement->inDetach());
-
if (oldFocusedElement->active())
oldFocusedElement->setActive(false);
« no previous file with comments | « no previous file | Source/core/dom/DocumentLifecycle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698