Title: [119876] trunk/Source/WebCore
- Revision
- 119876
- Author
- [email protected]
- Date
- 2012-06-08 16:41:36 -0700 (Fri, 08 Jun 2012)
Log Message
IndexedDB: Transactions without any request scheduled should abort itself.
https://bugs.webkit.org/show_bug.cgi?id=88052
Reviewed by Kentaro Hara.
This is needed for indexedDB to make it work for JSC. We need to clean up all the
pending transactions(transactions without any request scheduled) when leaving _javascript_ context.
Manually tested using the existing test LayoutTests/storage/indexeddb/tutorial.html
* bindings/js/JSMainThreadExecState.cpp:
(WebCore):
(WebCore::JSMainThreadExecState::didLeaveScriptContext):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::~JSMainThreadExecState):
(JSMainThreadExecState):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (119875 => 119876)
--- trunk/Source/WebCore/ChangeLog 2012-06-08 23:18:05 UTC (rev 119875)
+++ trunk/Source/WebCore/ChangeLog 2012-06-08 23:41:36 UTC (rev 119876)
@@ -1,3 +1,22 @@
+2012-06-08 Charles Wei <[email protected]>
+
+ IndexedDB: Transactions without any request scheduled should abort itself.
+ https://bugs.webkit.org/show_bug.cgi?id=88052
+
+ Reviewed by Kentaro Hara.
+
+ This is needed for indexedDB to make it work for JSC. We need to clean up all the
+ pending transactions(transactions without any request scheduled) when leaving _javascript_ context.
+
+ Manually tested using the existing test LayoutTests/storage/indexeddb/tutorial.html
+
+ * bindings/js/JSMainThreadExecState.cpp:
+ (WebCore):
+ (WebCore::JSMainThreadExecState::didLeaveScriptContext):
+ * bindings/js/JSMainThreadExecState.h:
+ (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
+ (JSMainThreadExecState):
+
2012-06-08 Ryosuke Niwa <[email protected]>
Crash in WebCore::CompositeEditCommand::breakOutOfEmptyListItem
Modified: trunk/Source/WebCore/bindings/js/JSMainThreadExecState.cpp (119875 => 119876)
--- trunk/Source/WebCore/bindings/js/JSMainThreadExecState.cpp 2012-06-08 23:18:05 UTC (rev 119875)
+++ trunk/Source/WebCore/bindings/js/JSMainThreadExecState.cpp 2012-06-08 23:41:36 UTC (rev 119876)
@@ -27,15 +27,23 @@
#include "JSMainThreadExecState.h"
#include "WebKitMutationObserver.h"
+#if ENABLE(INDEXED_DATABASE)
+#include "IDBPendingTransactionMonitor.h"
+#endif
+
namespace WebCore {
JSC::ExecState* JSMainThreadExecState::s_mainThreadState = 0;
-#if ENABLE(MUTATION_OBSERVERS)
void JSMainThreadExecState::didLeaveScriptContext()
{
+#if ENABLE(INDEXED_DATABASE)
+ IDBPendingTransactionMonitor::abortPendingTransactions();
+#endif
+
+#if ENABLE(MUTATION_OBSERVERS)
WebKitMutationObserver::deliverAllMutations();
+#endif
}
-#endif
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/js/JSMainThreadExecState.h (119875 => 119876)
--- trunk/Source/WebCore/bindings/js/JSMainThreadExecState.h 2012-06-08 23:18:05 UTC (rev 119875)
+++ trunk/Source/WebCore/bindings/js/JSMainThreadExecState.h 2012-06-08 23:41:36 UTC (rev 119876)
@@ -88,25 +88,19 @@
{
ASSERT(isMainThread());
-#if ENABLE(MUTATION_OBSERVERS)
bool didExitJavaScript = s_mainThreadState && !m_previousState;
-#endif
s_mainThreadState = m_previousState;
-#if ENABLE(MUTATION_OBSERVERS)
if (didExitJavaScript)
didLeaveScriptContext();
-#endif
}
private:
static JSC::ExecState* s_mainThreadState;
JSC::ExecState* m_previousState;
-#if ENABLE(MUTATION_OBSERVERS)
static void didLeaveScriptContext();
-#endif
};
// Null state prevents origin security checks.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes