Title: [146540] trunk/Source/WebCore
- Revision
- 146540
- Author
- jsb...@chromium.org
- Date
- 2013-03-21 16:52:16 -0700 (Thu, 21 Mar 2013)
Log Message
IndexedDB: Ensure script wrappers can be collected after context is stopped
https://bugs.webkit.org/show_bug.cgi?id=112976
Reviewed by Adam Barth.
ActiveDOMObject::hasPendingActivity is called to see if script wrappers
can be disposed of. Once the script execution context has stopped they
should be free to go - include this in the checks.
No new tests - suggestions welcome.
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::hasPendingActivity): Return false if stopped.
(WebCore::IDBDatabase::stop): Don't bother calling empty super impl.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::hasPendingActivity): Return false if stopped.
(WebCore::IDBRequest::stop): Don't bother calling empty super impl.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::hasPendingActivity): Return false if stopped.
(WebCore::IDBTransaction::stop): Don't bother calling empty super impl.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (146539 => 146540)
--- trunk/Source/WebCore/ChangeLog 2013-03-21 23:47:56 UTC (rev 146539)
+++ trunk/Source/WebCore/ChangeLog 2013-03-21 23:52:16 UTC (rev 146540)
@@ -1,3 +1,26 @@
+2013-03-21 Joshua Bell <jsb...@chromium.org>
+
+ IndexedDB: Ensure script wrappers can be collected after context is stopped
+ https://bugs.webkit.org/show_bug.cgi?id=112976
+
+ Reviewed by Adam Barth.
+
+ ActiveDOMObject::hasPendingActivity is called to see if script wrappers
+ can be disposed of. Once the script execution context has stopped they
+ should be free to go - include this in the checks.
+
+ No new tests - suggestions welcome.
+
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::hasPendingActivity): Return false if stopped.
+ (WebCore::IDBDatabase::stop): Don't bother calling empty super impl.
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::hasPendingActivity): Return false if stopped.
+ (WebCore::IDBRequest::stop): Don't bother calling empty super impl.
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::hasPendingActivity): Return false if stopped.
+ (WebCore::IDBTransaction::stop): Don't bother calling empty super impl.
+
2013-03-21 Russell McClellan <russell.mcclel...@gmail.com>
Remove upcastPointer from ActiveDOMObject constructor
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (146539 => 146540)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2013-03-21 23:47:56 UTC (rev 146539)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2013-03-21 23:52:16 UTC (rev 146540)
@@ -352,12 +352,11 @@
{
// The script wrapper must not be collected before the object is closed or
// we can't fire a "versionchange" event to let script manually close the connection.
- return !m_closePending && !m_eventTargetData.eventListenerMap.isEmpty();
+ return !m_closePending && !m_eventTargetData.eventListenerMap.isEmpty() && !m_contextStopped;
}
void IDBDatabase::stop()
{
- ActiveDOMObject::stop();
// Stop fires at a deterministic time, so we need to call close in it.
close();
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (146539 => 146540)
--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp 2013-03-21 23:47:56 UTC (rev 146539)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp 2013-03-21 23:52:16 UTC (rev 146540)
@@ -420,12 +420,11 @@
// FIXME: In an ideal world, we should return true as long as anyone has a or can
// get a handle to us and we have event listeners. This is order to handle
// user generated events properly.
- return m_hasPendingActivity;
+ return m_hasPendingActivity && !m_contextStopped;
}
void IDBRequest::stop()
{
- ActiveDOMObject::stop();
if (m_contextStopped)
return;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (146539 => 146540)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2013-03-21 23:47:56 UTC (rev 146539)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2013-03-21 23:52:16 UTC (rev 146540)
@@ -333,7 +333,7 @@
// FIXME: In an ideal world, we should return true as long as anyone has a or can
// get a handle to us or any child request object and any of those have
// event listeners. This is in order to handle user generated events properly.
- return m_hasPendingActivity;
+ return m_hasPendingActivity && !m_contextStopped;
}
IndexedDB::TransactionMode IDBTransaction::stringToMode(const String& modeString, ScriptExecutionContext* context, ExceptionCode& ec)
@@ -422,7 +422,6 @@
void IDBTransaction::stop()
{
- ActiveDOMObject::stop();
m_contextStopped = true;
abort(IGNORE_EXCEPTION);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes