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

Unified Diff: Source/core/frame/DOMWindow.cpp

Issue 258843002: Remove unsound asserts in the DOMWindow destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Invert and use ASSERT_ENABLED Created 6 years, 8 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 | « Source/core/frame/DOMWindow.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/DOMWindow.cpp
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp
index 1be25580cdf8821a5d4908e18cc287336b52db5f..26cb500f634fe8b1aa70012718de8f892d6033e1 100644
--- a/Source/core/frame/DOMWindow.cpp
+++ b/Source/core/frame/DOMWindow.cpp
@@ -323,6 +323,9 @@ bool DOMWindow::canShowModalDialogNow(const LocalFrame* frame)
DOMWindow::DOMWindow(LocalFrame& frame)
: FrameDestructionObserver(&frame)
, m_shouldPrintWhenFinishedLoading(false)
+#if ASSERT_ENABLED
+ , m_hasBeenReset(false)
+#endif
{
ScriptWrappable::init(this);
}
@@ -477,23 +480,7 @@ void DOMWindow::statePopped(PassRefPtr<SerializedScriptValue> stateObject)
DOMWindow::~DOMWindow()
{
- ASSERT(!m_screen);
- ASSERT(!m_history);
- ASSERT(!m_locationbar);
- ASSERT(!m_menubar);
- ASSERT(!m_personalbar);
- ASSERT(!m_scrollbars);
- ASSERT(!m_statusbar);
- ASSERT(!m_toolbar);
- ASSERT(!m_console);
- ASSERT(!m_navigator);
- ASSERT(!m_performance);
- ASSERT(!m_location);
- ASSERT(!m_media);
- ASSERT(!m_sessionStorage);
- ASSERT(!m_localStorage);
- ASSERT(!m_applicationCache);
-
+ ASSERT(m_hasBeenReset);
reset();
removeAllEventListeners();
@@ -594,6 +581,9 @@ void DOMWindow::resetDOMWindowProperties()
m_sessionStorage = nullptr;
m_localStorage = nullptr;
m_applicationCache = nullptr;
+#if ASSERT_ENABLED
+ m_hasBeenReset = true;
+#endif
}
bool DOMWindow::isCurrentlyDisplayedInFrame() const
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698