Diff
Modified: trunk/LayoutTests/ChangeLog (193486 => 193487)
--- trunk/LayoutTests/ChangeLog 2015-12-05 00:12:23 UTC (rev 193486)
+++ trunk/LayoutTests/ChangeLog 2015-12-05 00:31:30 UTC (rev 193487)
@@ -1,5 +1,14 @@
2015-12-04 Brady Eidson <beid...@apple.com>
+ Modern IDB: Flip test expectations around so we only list failures.
+ https://bugs.webkit.org/show_bug.cgi?id=151880
+
+ Reviewed by Alex Christensen.
+
+ * platform/mac-wk1/TestExpectations:
+
+2015-12-04 Brady Eidson <beid...@apple.com>
+
Modern IDB: storage/indexeddb/cursor-update.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151879
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (193486 => 193487)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-05 00:12:23 UTC (rev 193486)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-05 00:31:30 UTC (rev 193487)
@@ -57,7 +57,6 @@
### START OF (2) Failures without bug reports
# Legacy IndexedDB will never be enabled in Mac WK1.
-storage/indexeddb
imported/w3c/indexeddb
fast/history/page-cache-indexed-closed-db.html
fast/history/page-cache-indexed-opened-db.html
@@ -70,28 +69,110 @@
crypto/subtle/rsa-indexeddb-non-exportable.html
inspector/indexeddb
-# Tests that are skipped above but that pass in Modern IDB are unskipped below.
-storage/indexeddb/aborted-versionchange-closes.html [ Pass ]
-storage/indexeddb/basics.html [ Pass ]
-storage/indexeddb/create-and-remove-object-store.html [ Pass ]
-storage/indexeddb/create-object-store-options.html [ Pass ]
-storage/indexeddb/cursor-advance.html [ Pass ]
-storage/indexeddb/cursor-basics.html [ Pass ]
-storage/indexeddb/cursor-cast.html [ Pass ]
-storage/indexeddb/cursor-finished.html [ Pass ]
-storage/indexeddb/cursor-index-delete.html [ Pass ]
-storage/indexeddb/cursor-overloads.html [ Pass ]
-storage/indexeddb/cursor-skip-deleted.html [ Pass ]
-storage/indexeddb/cursor-update.html [ Pass ]
-storage/indexeddb/events.html [ Pass ]
-storage/indexeddb/exceptions.html [ Pass ]
-storage/indexeddb/modern [ Pass ]
-storage/indexeddb/mozilla [ Pass ]
-storage/indexeddb/transaction-abort.html [ Pass ]
-storage/indexeddb/transaction-error.html [ Pass ]
-storage/indexeddb/transaction-event-propagation.html [ Pass ]
-storage/indexeddb/version-change-exclusive.html [ Pass ]
+# IDB tests that crash
+storage/indexeddb/database-quota.html [ Skip ]
+storage/indexeddb/deleted-objects.html [ Skip ]
+storage/indexeddb/dont-wedge.html [ Skip ]
+storage/indexeddb/intversion-two-opens-no-versions.html [ Skip ]
+storage/indexeddb/keypath-basics.html [ Skip ]
+storage/indexeddb/keypath-fetch-key.html [ Skip ]
+storage/indexeddb/lazy-index-population.html [ Skip ]
+storage/indexeddb/list-ordering.html [ Skip ]
+storage/indexeddb/open-bad-versions.html [ Skip ]
+storage/indexeddb/open-cursor.html [ Skip ]
+storage/indexeddb/open-db-private-browsing.html [ Skip ]
+storage/indexeddb/open-during-transaction.html [ Skip ]
+storage/indexeddb/structured-clone.html [ Skip ]
+storage/indexeddb/transaction-crash-on-abort.html [ Skip ]
+storage/indexeddb/version-change-exclusive.html [ Skip ]
+# Causes crashes downstream
+storage/indexeddb/key-generator.html [ Skip ]
+
+# IDB tests that timeout
+storage/indexeddb/database-closepending-flag.html [ Skip ]
+storage/indexeddb/delete-closed-database-object.html [ Skip ]
+storage/indexeddb/deletedatabase-blocked.html [ Skip ]
+storage/indexeddb/deletedatabase-delayed-by-versionchange.html [ Skip ]
+storage/indexeddb/intversion-blocked.html [ Skip ]
+storage/indexeddb/intversion-long-queue.html [ Skip ]
+storage/indexeddb/intversion-pending-version-changes-ascending.html [ Skip ]
+storage/indexeddb/intversion-pending-version-changes-descending.html [ Skip ]
+storage/indexeddb/intversion-pending-version-changes-same.html [ Skip ]
+storage/indexeddb/objectstore-basics.html [ Skip ]
+storage/indexeddb/odd-strings.html [ Skip ]
+storage/indexeddb/set_version_blocked.html [ Skip ]
+storage/indexeddb/transaction-basics.html [ Skip ]
+storage/indexeddb/transaction-starvation.html [ Skip ]
+storage/indexeddb/unblocked-version-changes.html [ Skip ]
+
+# IDB tests with text failures
+storage/indexeddb/createIndex-after-failure.html [ Failure ]
+storage/indexeddb/cursor-continue-dir.html [ Failure ]
+storage/indexeddb/cursor-continue-validity.html [ Failure ]
+storage/indexeddb/cursor-continue.html [ Failure ]
+storage/indexeddb/cursor-continueprimarykey.html [ Failure ]
+storage/indexeddb/cursor-leak.html [ Failure ]
+storage/indexeddb/cursor-request-cycle.html [ Failure ]
+storage/indexeddb/database-basics.html [ Failure ]
+storage/indexeddb/database-close.html [ Failure ]
+storage/indexeddb/database-deletepending-flag.html [ Failure ]
+storage/indexeddb/database-wrapper.html [ Failure ]
+storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html [ Failure ]
+storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html [ Failure ]
+storage/indexeddb/deleteIndex.html [ Failure ]
+storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html [ Failure ]
+storage/indexeddb/deletedatabase-not-blocked.html [ Failure ]
+storage/indexeddb/dont-commit-on-blocked.html [ Failure ]
+storage/indexeddb/factory-basics.html [ Failure ]
+storage/indexeddb/factory-cmp.html [ Failure ]
+storage/indexeddb/factory-deletedatabase.html [ Failure ]
+storage/indexeddb/get-keyrange.html [ Failure ]
+storage/indexeddb/index-basics.html [ Failure ]
+storage/indexeddb/index-count.html [ Failure ]
+storage/indexeddb/index-cursor.html [ Failure ]
+storage/indexeddb/index-duplicate-keypaths.html [ Failure ]
+storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html [ Failure ]
+storage/indexeddb/intversion-close-between-events.html [ Failure ]
+storage/indexeddb/intversion-close-in-oncomplete.html [ Failure ]
+storage/indexeddb/intversion-close-in-upgradeneeded.html [ Failure ]
+storage/indexeddb/intversion-encoding.html [ Failure ]
+storage/indexeddb/intversion-gated-on-delete.html [ Failure ]
+storage/indexeddb/intversion-open-in-upgradeneeded.html [ Failure ]
+storage/indexeddb/intversion-open-with-version.html [ Failure ]
+storage/indexeddb/intversion-persistence.html [ Failure ]
+storage/indexeddb/intversion-upgrades.html [ Failure ]
+storage/indexeddb/invalid-keys.html [ Failure ]
+storage/indexeddb/key-type-array.html [ Failure ]
+storage/indexeddb/key-type-binary.html [ Failure ]
+storage/indexeddb/keypath-arrays.html [ Failure ]
+storage/indexeddb/keypath-edges.html [ Failure ]
+storage/indexeddb/keyrange.html [ Failure ]
+storage/indexeddb/lazy-index-types.html [ Failure ]
+storage/indexeddb/metadata.html [ Failure ]
+storage/indexeddb/noblobs.html [ Failure ]
+storage/indexeddb/object-lookups-in-versionchange.html [ Failure ]
+storage/indexeddb/objectstore-autoincrement.html [ Failure ]
+storage/indexeddb/objectstore-count.html [ Failure ]
+storage/indexeddb/objectstore-cursor.html [ Failure ]
+storage/indexeddb/open-ordering.html [ Failure ]
+storage/indexeddb/optional-arguments.html [ Failure ]
+storage/indexeddb/pending-version-change-on-exit.html [ Failure ]
+storage/indexeddb/pending-version-change-stuck-works-with-terminate.html [ Failure ]
+storage/indexeddb/pending-version-change-stuck.html [ Failure ]
+storage/indexeddb/persistence.html [ Failure ]
+storage/indexeddb/properties-disabled-at-runtime.html [ Failure ]
+storage/indexeddb/request-leak.html [ Failure ]
+storage/indexeddb/request-result-cache.html [ Failure ]
+storage/indexeddb/setversion-blocked-by-versionchange-close.html [ Failure ]
+storage/indexeddb/setversion-not-blocked.html [ Failure ]
+storage/indexeddb/transaction-active-flag.html [ Failure ]
+storage/indexeddb/transaction-after-close.html [ Failure ]
+storage/indexeddb/transaction-and-objectstore-calls.html [ Failure ]
+storage/indexeddb/transaction-read-only.html [ Failure ]
+storage/indexeddb/transaction-scope-sequencing.html [ Failure ]
+storage/indexeddb/version-change-abort.html [ Failure ]
+
# No workers support in Modern IDB yet
storage/indexeddb/basics-workers.html
storage/indexeddb/cursor-advance-workers.html
Modified: trunk/Source/WebCore/ChangeLog (193486 => 193487)
--- trunk/Source/WebCore/ChangeLog 2015-12-05 00:12:23 UTC (rev 193486)
+++ trunk/Source/WebCore/ChangeLog 2015-12-05 00:31:30 UTC (rev 193487)
@@ -1,3 +1,30 @@
+2015-12-04 Brady Eidson <beid...@apple.com>
+
+ Modern IDB: Flip test expectations around so we only list failures.
+ https://bugs.webkit.org/show_bug.cgi?id=151880
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Covered by all existing tests).
+
+ * Modules/indexeddb/client/IDBRequestImpl.cpp:
+ (WebCore::IDBClient::IDBRequest::stop):
+ (WebCore::IDBClient::IDBRequest::enqueueEvent):
+ (WebCore::IDBClient::IDBRequest::dispatchEvent):
+ * Modules/indexeddb/client/IDBRequestImpl.h:
+
+ * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+ (WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
+ (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
+ (WebCore::IDBClient::IDBTransaction::stop):
+ (WebCore::IDBClient::IDBTransaction::enqueueEvent):
+ (WebCore::IDBClient::IDBTransaction::dispatchEvent):
+ * Modules/indexeddb/client/IDBTransactionImpl.h:
+
+ * bindings/js/IDBBindingUtilities.cpp:
+ (WebCore::idbKeyToScriptValue): Protection against a ScriptExecutionContext that no longer has an ExecState.
+ A full reworking on the binding utilities to prevent this through is covered by b/151890
+
2015-12-04 Myles C. Maxfield <mmaxfi...@apple.com>
[Cocoa] Some fonts cause CTFontCopyAvailableTables() to return nullptr
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp (193486 => 193487)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp 2015-12-05 00:12:23 UTC (rev 193486)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp 2015-12-05 00:31:30 UTC (rev 193487)
@@ -237,9 +237,15 @@
return m_hasPendingActivity;
}
+void IDBRequest::stop()
+{
+ ASSERT(!m_contextStopped);
+ m_contextStopped = true;
+}
+
void IDBRequest::enqueueEvent(Ref<Event>&& event)
{
- if (!scriptExecutionContext())
+ if (!scriptExecutionContext() || m_contextStopped)
return;
event->setTarget(this);
@@ -251,6 +257,7 @@
LOG(IndexedDB, "IDBRequest::dispatchEvent - %s (%p)", event.type().characters8(), this);
ASSERT(m_hasPendingActivity);
+ ASSERT(!m_contextStopped);
if (event.type() != eventNames().blockedEvent)
m_readyState = IDBRequestReadyState::Done;
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h (193486 => 193487)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h 2015-12-05 00:12:23 UTC (rev 193486)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h 2015-12-05 00:31:30 UTC (rev 193487)
@@ -110,7 +110,8 @@
virtual const char* activeDOMObjectName() const override final;
virtual bool canSuspendForDocumentSuspension() const override final;
virtual bool hasPendingActivity() const override final;
-
+ virtual void stop() override final;
+
// EventTarget.
virtual void refEventTarget() override final { RefCounted<IDBRequest>::ref(); }
virtual void derefEventTarget() override final { RefCounted<IDBRequest>::deref(); }
@@ -138,6 +139,8 @@
IndexedDB::IndexRecordType m_requestedIndexRecordType;
RefPtr<IDBCursor> m_pendingCursor;
+
+ bool m_contextStopped { false };
};
} // namespace IDBClient
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (193486 => 193487)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp 2015-12-05 00:12:23 UTC (rev 193486)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp 2015-12-05 00:31:30 UTC (rev 193487)
@@ -166,7 +166,8 @@
void IDBTransaction::abortDueToFailedRequest(DOMError& error)
{
LOG(IndexedDB, "IDBTransaction::abortDueToFailedRequest");
- ASSERT(!isFinishedOrFinishing());
+ if (isFinishedOrFinishing())
+ return;
m_domError = &error;
ExceptionCodeWithMessage ec;
@@ -227,9 +228,15 @@
bool IDBTransaction::hasPendingActivity() const
{
- return m_state != IndexedDB::TransactionState::Finished;
+ return !m_contextStopped && m_state != IndexedDB::TransactionState::Finished;
}
+void IDBTransaction::stop()
+{
+ ASSERT(!m_contextStopped);
+ m_contextStopped = true;
+}
+
bool IDBTransaction::isActive() const
{
return m_state == IndexedDB::TransactionState::Active;
@@ -395,7 +402,7 @@
{
ASSERT(m_state != IndexedDB::TransactionState::Finished);
- if (!scriptExecutionContext())
+ if (!scriptExecutionContext() || m_contextStopped)
return;
event->setTarget(this);
@@ -407,6 +414,7 @@
LOG(IndexedDB, "IDBTransaction::dispatchEvent");
ASSERT(scriptExecutionContext());
+ ASSERT(!m_contextStopped);
ASSERT(event.target() == this);
ASSERT(event.type() == eventNames().completeEvent || event.type() == eventNames().abortEvent);
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (193486 => 193487)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h 2015-12-05 00:12:23 UTC (rev 193486)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h 2015-12-05 00:31:30 UTC (rev 193487)
@@ -81,6 +81,7 @@
virtual const char* activeDOMObjectName() const override final;
virtual bool canSuspendForDocumentSuspension() const override final;
virtual bool hasPendingActivity() const override final;
+ virtual void stop() override final;
const IDBTransactionInfo info() const { return m_info; }
IDBDatabase& database() { return m_database.get(); }
@@ -207,6 +208,8 @@
HashMap<String, RefPtr<IDBObjectStore>> m_referencedObjectStores;
HashSet<RefPtr<IDBRequest>> m_openRequests;
+
+ bool m_contextStopped { false };
};
class TransactionActivator {
Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp (193486 => 193487)
--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp 2015-12-05 00:12:23 UTC (rev 193486)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp 2015-12-05 00:31:30 UTC (rev 193487)
@@ -505,6 +505,9 @@
Deprecated::ScriptValue idbKeyToScriptValue(DOMRequestState* requestState, PassRefPtr<IDBKey> key)
{
ExecState* exec = requestState->exec();
+ if (!exec)
+ return { };
+
return Deprecated::ScriptValue(exec->vm(), idbKeyToJSValue(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), key.get()));
}