Modern IDB: IDBTransaction.objectStore() support.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 00:12:00 +0000 (00:12 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 00:12:00 +0000 (00:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150607

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/aborted-put.html
       storage/indexeddb/modern/idbtransaction-objectstore-failures.html

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::put):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::objectStore):
(WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingObjectStore):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):

* Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
(WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
* Modules/indexeddb/shared/IDBDatabaseInfo.h:

* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::objectStores):

LayoutTests:

* storage/indexeddb/modern/aborted-put-expected.txt: Added.
* storage/indexeddb/modern/aborted-put.html: Added.
* storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt: Added.
* storage/indexeddb/modern/idbtransaction-objectstore-failures.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191645 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/aborted-put-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/aborted-put.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp
Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp
Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h
Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp
Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h
Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h
Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h

index fec97b3..049b35e 100644 (file)
@@ -1,3 +1,15 @@
+2015-10-27  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: IDBTransaction.objectStore() support.
+        https://bugs.webkit.org/show_bug.cgi?id=150607
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/aborted-put-expected.txt: Added.
+        * storage/indexeddb/modern/aborted-put.html: Added.
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt: Added.
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures.html: Added.
+
 2015-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Implement viewport-width-based fast-click heuristic
diff --git a/LayoutTests/storage/indexeddb/modern/aborted-put-expected.txt b/LayoutTests/storage/indexeddb/modern/aborted-put-expected.txt
new file mode 100644 (file)
index 0000000..dd46037
--- /dev/null
@@ -0,0 +1,24 @@
+ALERT: First upgrade needed: Old version - 0 New version - 1
+ALERT: [object IDBTransaction] - versionchange
+ALERT: [object IDBDatabase]
+ALERT: put succeeded - key was 'foo'
+ALERT: get 'foo' succeeded - value was 'bar'
+ALERT: get 'far' succeeded - value was 'undefined'
+ALERT: First version change transaction completed
+ALERT: Second upgrade needed: Old version - 1 New version - 2
+ALERT: [object IDBTransaction] - versionchange
+ALERT: [object IDBDatabase]
+ALERT: get1 'foo' succeeded - value was 'baz'
+ALERT: get2 'far' succeeded - value was 'boo'
+ALERT: Second version change transaction abort
+ALERT: Third upgrade needed: Old version - 1 New version - 2
+ALERT: [object IDBTransaction] - versionchange
+ALERT: [object IDBDatabase]
+ALERT: get1 'foo' succeeded - value was 'bar'
+ALERT: get2 'far' succeeded - value was 'undefined'
+ALERT: Third version change transaction complete
+ALERT: Done
+This test creates some object stores, putting some values in them, committing the transaction.
+In a new transaction, it then overwrites those values, but then aborts the transaction.
+Finally it verifies everything is set up from the first transaction, and nothing from the aborted one committed.
+
diff --git a/LayoutTests/storage/indexeddb/modern/aborted-put.html b/LayoutTests/storage/indexeddb/modern/aborted-put.html
new file mode 100644 (file)
index 0000000..e9ce129
--- /dev/null
@@ -0,0 +1,204 @@
+This test creates some object stores, putting some values in them, committing the transaction.<br>
+In a new transaction, it then overwrites those values, but then aborts the transaction.<br>
+Finally it verifies everything is set up from the first transaction, and nothing from the aborted one committed.<br>
+<script>
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+var request = window.indexedDB.open("AbortedPutTestDatabase");
+
+function done()
+{
+    alert("Done");
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+request.onupgradeneeded = function(event)
+{
+    alert("First upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+    
+    var tx = request.transaction;
+    var db = event.target.result;
+
+    alert(tx + " - " + tx.mode);
+    alert(db);
+
+    var os1 = db.createObjectStore("TestObjectStore1");
+    var os2 = db.createObjectStore("TestObjectStore2");
+
+    var putRequest = os1.put("bar", "foo");
+    
+    putRequest.onsuccess = function(event) {
+        alert("put succeeded - key was '" + putRequest.result + "'");
+        
+        var getRequest1 = os1.get("foo");
+        getRequest1.onsuccess = function(event) {
+            alert("get 'foo' succeeded - value was '" + getRequest1.result + "'");
+        }
+
+        getRequest1.onerror = function(event) {
+            alert("get 'foo' unexpectedly failed - " + event);
+            done();
+        }
+        
+        var getRequest2 = os2.get("far");
+        getRequest2.onsuccess = function(event) {
+            alert("get 'far' succeeded - value was '" + getRequest2.result + "'");
+        }
+
+        getRequest2.onerror = function(event) {
+            alert("get 'far' unexpectedly failed - " + event);
+            done();
+        }
+    }
+
+    putRequest.onerror = function(event) {
+        alert("put unexpectedly failed - " + event);
+        done();
+    }
+    
+    tx.onabort = function(event) {
+        alert("First version change transaction unexpected abort");
+        done();
+    }
+
+    tx.oncomplete = function(event) {
+        alert("First version change transaction completed");
+        db.close();
+        continueTest1();
+    }
+
+    tx.onerror = function(event) {
+        alert("First version change transaction unexpected error - " + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var request = window.indexedDB.open("AbortedPutTestDatabase", 2);
+
+    request.onupgradeneeded = function(event) {
+        alert("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+    
+        var tx = request.transaction;
+        var db = event.target.result;
+
+        alert(tx + " - " + tx.mode);
+        alert(db);
+
+        var os1 = tx.objectStore("TestObjectStore1");
+        var os2 = tx.objectStore("TestObjectStore2");
+        var putRequest1 = os1.put("baz", "foo");
+        var putRequest2 = os2.put("boo", "far");
+    
+        putRequest1.onerror = function(e) {
+            alert("Unexpected error overwriting bar with baz - " + e);
+            done();
+        }
+
+        putRequest2.onerror = function(e) {
+            alert("Writing into second object store unexpectedly failed - " + e);
+            done();
+        }
+        
+        putRequest2.onsuccess = function(e) {
+            var getRequest1 = os1.get("foo");
+            var getRequest2 = os2.get("far");
+            
+            getRequest1.onsuccess = function(event) {
+                alert("get1 'foo' succeeded - value was '" + getRequest1.result + "'");
+            }
+
+            getRequest1.onerror = function(event) {
+                alert("get1 unexpectedly failed - " + event);
+                done();
+            }
+
+            getRequest2.onsuccess = function(event) {
+                alert("get2 'far' succeeded - value was '" + getRequest2.result + "'");
+                tx.abort();
+            }
+
+            getRequest2.onerror = function(event) {
+                alert("get2 unexpectedly failed - " + event);
+                done();
+            }
+        }
+        
+        tx.onabort = function(event) {
+            alert("Second version change transaction abort");
+            db.close();
+            continueTest2();
+        }
+
+        tx.oncomplete = function(event) {
+            alert("Second version change transaction unexpected complete");
+            done();
+        }
+
+        tx.onerror = function(event) {
+            alert("Second version change transaction unexpected error - " + event);
+            done();
+        }
+    }
+}
+
+function continueTest2()
+{
+    var request = window.indexedDB.open("AbortedPutTestDatabase", 2);
+
+    request.onupgradeneeded = function(event) {
+        alert("Third upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+    
+        var tx = request.transaction;
+        var db = event.target.result;
+
+        alert(tx + " - " + tx.mode);
+        alert(db);
+
+        var os1 = tx.objectStore("TestObjectStore1");
+        var os2 = tx.objectStore("TestObjectStore2");
+        var getRequest1 = os1.get("foo");
+        var getRequest2 = os2.get("far");
+    
+        getRequest1.onsuccess = function(event) {
+            alert("get1 'foo' succeeded - value was '" + getRequest1.result + "'");
+        }
+
+        getRequest1.onerror = function(event) {
+            alert("get1 'foo' unexpectedly failed - " + event);
+            done();
+        }
+
+        getRequest2.onsuccess = function(event) {
+            alert("get2 'far' succeeded - value was '" + getRequest2.result + "'");
+        }
+
+        getRequest2.onerror = function(event) {
+            alert("get2 'far' unexpectedly failed - " + event);
+            done();
+        }
+        
+        tx.onabort = function(event) {
+            alert("Third version change transaction unexpected abort");
+            done();
+        }
+
+        tx.oncomplete = function(event) {
+            alert("Third version change transaction complete");
+            done();
+        }
+
+        tx.onerror = function(event) {
+            alert("Third version change transaction unexpected error - " + event);
+            done();
+        }
+    }
+}
+
+</script>
diff --git a/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt b/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt
new file mode 100644 (file)
index 0000000..939b38a
--- /dev/null
@@ -0,0 +1,11 @@
+ALERT: Upgrade needed: Old version - 0 New version - 1
+ALERT: [object IDBTransaction] - versionchange
+ALERT: [object IDBDatabase]
+ALERT: Caught attempt to access empty-named object store on the transaction
+ALERT: Caught attempt to access null-named object store on the transaction
+ALERT: Caught attempt to access non-existant object store on the transaction
+ALERT: Caught attempt to access valid object store on a transaction that is already finishing
+ALERT: First version change transaction abort
+ALERT: Done
+This tests some obvious failures that can happen while calling transaction.objectStore()
+
diff --git a/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html b/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html
new file mode 100644 (file)
index 0000000..92eaf5a
--- /dev/null
@@ -0,0 +1,79 @@
+This tests some obvious failures that can happen while calling transaction.objectStore()<br>
+<script>
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+var request = window.indexedDB.open("TransactionObjectStoreFailuresTestDatabase");
+
+function done()
+{
+    alert("Done");
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+request.onupgradeneeded = function(event)
+{
+    alert("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+    
+    var tx = request.transaction;
+    var db = event.target.result;
+
+    alert(tx + " - " + tx.mode);
+    alert(db);
+
+    var os1 = db.createObjectStore("TestObjectStore1");
+    var os2 = db.createObjectStore("TestObjectStore2");
+
+    var putRequest = os1.put("bar", "foo");
+    
+    putRequest.onerror = function(event) {
+        alert("put unexpectedly failed - " + event);
+        done();
+    }
+    
+    try {
+        tx.objectStore("");
+    } catch(e) {
+        alert("Caught attempt to access empty-named object store on the transaction");
+    }
+    
+    try {
+        tx.objectStore();
+    } catch(e) {
+        alert("Caught attempt to access null-named object store on the transaction");
+    }
+     
+    try {
+        tx.objectStore("ThisObjectStoreDoesNotExist");
+    } catch(e) {
+        alert("Caught attempt to access non-existant object store on the transaction");
+    }
+    
+    tx.abort();
+    
+    try {
+        tx.objectStore("TestObjectStore1");
+    } catch(e) {
+        alert("Caught attempt to access valid object store on a transaction that is already finishing");
+    }
+      
+    tx.onabort = function(event) {
+        alert("First version change transaction abort");
+        done();
+    }
+
+    tx.oncomplete = function(event) {
+        alert("First version change transaction unexpected complete");
+        done();
+    }
+
+    tx.onerror = function(event) {
+        alert("First version change transaction unexpected error - " + event);
+        done();
+    }
+}
+</script>
index fd84169..0b63785 100644 (file)
@@ -1,3 +1,35 @@
+2015-10-27  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: IDBTransaction.objectStore() support.
+        https://bugs.webkit.org/show_bug.cgi?id=150607
+
+        Reviewed by Alex Christensen.
+
+        Tests: storage/indexeddb/modern/aborted-put.html
+               storage/indexeddb/modern/idbtransaction-objectstore-failures.html
+
+        * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
+        (WebCore::IDBClient::IDBObjectStore::put):
+        
+        * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+        (WebCore::IDBClient::IDBTransaction::objectStore):
+        (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
+        * Modules/indexeddb/client/IDBTransactionImpl.h:
+        
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingObjectStore):
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
+        
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
+        
+        * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
+        (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
+        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
+        
+        * Modules/indexeddb/shared/IDBTransactionInfo.h:
+        (WebCore::IDBTransactionInfo::objectStores):
+
 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Remove unused / duplicated XHR timeline instrumentation
index 4889b37..b02cc15 100644 (file)
@@ -169,7 +169,7 @@ RefPtr<WebCore::IDBRequest> IDBObjectStore::add(JSC::ExecState&, Deprecated::Scr
 RefPtr<WebCore::IDBRequest> IDBObjectStore::put(JSC::ExecState& execState, Deprecated::ScriptValue& value, const Deprecated::ScriptValue& key, ExceptionCode& ec)
 {
     auto idbKey = scriptValueToIDBKey(execState, key);
-    return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, ec);
+    return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::Overwrite, ec);
 }
 
 RefPtr<WebCore::IDBRequest> IDBObjectStore::putOrAdd(JSC::ExecState& state, Deprecated::ScriptValue& value, RefPtr<IDBKey> key, IndexedDB::ObjectStoreOverwriteMode overwriteMode, ExceptionCode& ec)
index bc22b6f..2ec2ffc 100644 (file)
@@ -99,10 +99,48 @@ RefPtr<DOMError> IDBTransaction::error() const
     return nullptr;
 }
 
-RefPtr<WebCore::IDBObjectStore> IDBTransaction::objectStore(const String&, ExceptionCode&)
+RefPtr<WebCore::IDBObjectStore> IDBTransaction::objectStore(const String& objectStoreName, ExceptionCode& ec)
 {
-    ASSERT_NOT_REACHED();
-    return nullptr;
+    LOG(IndexedDB, "IDBTransaction::objectStore");
+
+    if (objectStoreName.isEmpty()) {
+        ec = NOT_FOUND_ERR;
+        return nullptr;
+    }
+
+    if (isFinishedOrFinishing()) {
+        ec = INVALID_STATE_ERR;
+        return nullptr;
+    }
+
+    auto iterator = m_referencedObjectStores.find(objectStoreName);
+    if (iterator != m_referencedObjectStores.end())
+        return iterator->value;
+
+    bool found = false;
+    for (auto& objectStore : m_info.objectStores()) {
+        if (objectStore == objectStoreName) {
+            found = true;
+            break;
+        }
+    }
+
+    auto* info = m_database->info().infoForExistingObjectStore(objectStoreName);
+    if (!info) {
+        ec = NOT_FOUND_ERR;
+        return nullptr;
+    }
+
+    // Version change transactions are scoped to every object store in the database.
+    if (!found && !isVersionChange()) {
+        ec = NOT_FOUND_ERR;
+        return nullptr;
+    }
+
+    auto objectStore = IDBObjectStore::create(*info, *this);
+    m_referencedObjectStores.set(objectStoreName, &objectStore.get());
+
+    return adoptRef(&objectStore.leakRef());
 }
 
 void IDBTransaction::abort(ExceptionCode& ec)
@@ -297,9 +335,11 @@ void IDBTransaction::createObjectStoreOnServer(TransactionOperation& operation,
 {
     LOG(IndexedDB, "IDBTransaction::createObjectStoreOnServer");
 
-    ASSERT(!isFinishedOrFinishing());
     ASSERT(isVersionChange());
 
+    if (isFinishedOrFinishing())
+        return;
+
     m_database->serverConnection().createObjectStore(operation, info);
 }
 
index 6408575..3e7e765 100644 (file)
@@ -133,6 +133,8 @@ private:
 
     Deque<RefPtr<TransactionOperation>> m_transactionOperationQueue;
     HashMap<IDBResourceIdentifier, RefPtr<TransactionOperation>> m_transactionOperationMap;
+
+    HashMap<String, RefPtr<IDBObjectStore>> m_referencedObjectStores;
 };
 
 class TransactionActivator {
index c564ad6..34241b3 100644 (file)
@@ -68,6 +68,18 @@ void MemoryBackingStoreTransaction::addNewObjectStore(MemoryObjectStore& objectS
     objectStore.writeTransactionStarted(*this);
 }
 
+void MemoryBackingStoreTransaction::addExistingObjectStore(MemoryObjectStore& objectStore)
+{
+    LOG(IndexedDB, "MemoryBackingStoreTransaction::addExistingObjectStore");
+
+    ASSERT(isWriting());
+
+    ASSERT(!m_objectStores.contains(&objectStore));
+    m_objectStores.add(&objectStore);
+
+    objectStore.writeTransactionStarted(*this);
+}
+
 void MemoryBackingStoreTransaction::recordValueChanged(MemoryObjectStore& objectStore, const IDBKeyData& key)
 {
     ASSERT(m_objectStores.contains(&objectStore));
index 295bbca..4652c21 100644 (file)
@@ -56,6 +56,7 @@ public:
     const IDBDatabaseInfo& originalDatabaseInfo() const;
 
     void addNewObjectStore(MemoryObjectStore&);
+    void addExistingObjectStore(MemoryObjectStore&);
     void recordValueChanged(MemoryObjectStore&, const IDBKeyData&);
 
     void abort();
index fe2fa18..a818d19 100644 (file)
@@ -72,6 +72,13 @@ IDBError MemoryIDBBackingStore::beginTransaction(const IDBTransactionInfo& info)
         return IDBError(IDBExceptionCode::InvalidStateError, "Backing store asked to create transaction it already has a record of");
 
     auto transaction = MemoryBackingStoreTransaction::create(*this, info);
+
+    // VersionChange transactions are scoped to "every object store".
+    if (transaction->isVersionChange()) {
+        for (auto& objectStore : m_objectStores.values())
+            transaction->addExistingObjectStore(*objectStore);
+    }
+
     m_transactions.set(info.identifier(), WTF::move(transaction));
 
     return IDBError();
index 5ddb2a2..89b0dde 100644 (file)
@@ -86,6 +86,16 @@ const IDBObjectStoreInfo* IDBDatabaseInfo::infoForExistingObjectStore(uint64_t o
     return &iterator->value;
 }
 
+const IDBObjectStoreInfo* IDBDatabaseInfo::infoForExistingObjectStore(const String& name) const
+{
+    for (auto& objectStore : m_objectStoreMap.values()) {
+        if (objectStore.name() == name)
+            return &objectStore;
+    }
+
+    return nullptr;
+}
+
 Vector<String> IDBDatabaseInfo::objectStoreNames() const
 {
     Vector<String> names;
index 0df9e16..b6ac68a 100644 (file)
@@ -50,6 +50,7 @@ public:
     IDBObjectStoreInfo createNewObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement);
     void addExistingObjectStore(const IDBObjectStoreInfo&);
     const IDBObjectStoreInfo* infoForExistingObjectStore(uint64_t objectStoreIdentifier) const;
+    const IDBObjectStoreInfo* infoForExistingObjectStore(const String& objectStoreName) const;
 
     Vector<String> objectStoreNames() const;
 
index 9a8d105..b34abd9 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "IDBResourceIdentifier.h"
 #include "IndexedDB.h"
+#include <wtf/Vector.h>
 
 namespace WebCore {
 namespace IDBServer {
@@ -47,6 +48,8 @@ public:
     IndexedDB::TransactionMode mode() const { return m_mode; }
     uint64_t newVersion() const { return m_newVersion; }
 
+    const Vector<String>& objectStores() const { return m_objectStores; }
+
 private:
     IDBTransactionInfo(const IDBResourceIdentifier&);
 
@@ -54,6 +57,7 @@ private:
 
     IndexedDB::TransactionMode m_mode { IndexedDB::TransactionMode::ReadOnly };
     uint64_t m_newVersion { 0 };
+    Vector<String> m_objectStores;
 };
 
 } // namespace WebCore