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

Unified Diff: Source/WebCore/storage/IDBRequest.cpp

Issue 7488021: Merge 91571 - Fix crash in IDBRequest::abort (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/storage/IDBRequest.cpp
===================================================================
--- Source/WebCore/storage/IDBRequest.cpp (revision 91573)
+++ Source/WebCore/storage/IDBRequest.cpp (working copy)
@@ -66,7 +66,7 @@
IDBRequest::~IDBRequest()
{
- ASSERT(m_readyState == DONE || m_readyState == EarlyDeath);
+ ASSERT(m_readyState == DONE || m_readyState == EarlyDeath || !scriptExecutionContext());
if (m_transaction)
m_transaction->unregisterRequest(this);
}
@@ -149,8 +149,11 @@
ASSERT(m_readyState == DONE);
return;
}
+ // FIXME: Remove isDocument check when
+ // https://bugs.webkit.org/show_bug.cgi?id=57789 is resolved.
+ if (!scriptExecutionContext() || !scriptExecutionContext()->isDocument())
+ return;
- ASSERT(scriptExecutionContext()->isDocument());
EventQueue* eventQueue = static_cast<Document*>(scriptExecutionContext())->eventQueue();
for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698