WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-96614-20121109191305.patch (text/plain), 3.69 KB, created by
Charles Wei
on 2012-11-09 03:14:58 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Charles Wei
Created:
2012-11-09 03:14:58 PST
Size:
3.69 KB
patch
obsolete
>Subversion Revision: 134037 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index baf7a1ae70b173537e464a22791d8ad6280401a8..91dff4ef0665bd42063d5c10385167fdf220b840 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,27 @@ >+2012-11-09 Charles Wei <charles.wei@torchmobile.com.cn> >+ >+ Need to clear exception in JSDictionary in IndexedDB between 2 query. >+ https://bugs.webkit.org/show_bug.cgi?id=96614 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ IndexedDB IDBDatabase::createObjectStore supports both String type of KeyPath and >+ String Array type of KeyPath. It will first try to get the keyPath as a String Array, >+ if fails, it will try to get KeyPath as a String, from the Dictionary. The first get >+ will leave the internal ExecState of Dictionary in exception state. We need to clear >+ the exception state before the 2nd query, otherwise the second query will also fail. >+ >+ No new tests. The existing test case LayoutTests/storage/indexeddb/tutorial.html should >+ now work with this patch. >+ >+ * Modules/indexeddb/IDBDatabase.cpp: >+ (WebCore::IDBDatabase::createObjectStore): >+ * bindings/js/Dictionary.cpp: >+ (WebCore::Dictionary::clearException): >+ (WebCore): >+ * bindings/js/Dictionary.h: >+ (Dictionary): >+ > 2012-11-09 Vsevolod Vlasov <vsevik@chromium.org> > > Web Inspector: Add meaningful error message when request content was evicted from inspector cache. >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >index fccb456c5d68a21467f58f09cdc627fc30fd9782..5e45a6ef62abe32c42ee1b53bd45a9245a205e4b 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >@@ -138,8 +138,11 @@ PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co > Vector<String> keyPathArray; > if (options.get("keyPath", keyPathArray)) > keyPath = IDBKeyPath(keyPathArray); >- else if (options.getWithUndefinedOrNullCheck("keyPath", keyPathString)) >- keyPath = IDBKeyPath(keyPathString); >+ else { >+ options.clearException(); // Clear any exception above step might have caused. >+ if (options.getWithUndefinedOrNullCheck("keyPath", keyPathString)) >+ keyPath = IDBKeyPath(keyPathString); >+ } > } > > if (m_metadata.containsObjectStore(name)) { >diff --git a/Source/WebCore/bindings/js/Dictionary.cpp b/Source/WebCore/bindings/js/Dictionary.cpp >index 5c81f2025ce428566e4fcc49b92ea10084f849b9..6bfc5d81736c3730c90f4d550b1c8705e67b1477 100644 >--- a/Source/WebCore/bindings/js/Dictionary.cpp >+++ b/Source/WebCore/bindings/js/Dictionary.cpp >@@ -103,4 +103,11 @@ bool Dictionary::getWithUndefinedOrNullCheck(const String& propertyName, String& > return m_dictionary.getWithUndefinedOrNullCheck(propertyName, value); > } > >+void Dictionary::clearException() const >+{ >+ ExecState* exec = m_dictionary.execState(); >+ if (exec->hadException()) >+ exec->clearException(); >+} >+ > }; >diff --git a/Source/WebCore/bindings/js/Dictionary.h b/Source/WebCore/bindings/js/Dictionary.h >index 94da878ff6b6bfac80214a87b47ea3fec6f8593c..d1c822920f1acc292b878685457c90b5d74e3ad5 100644 >--- a/Source/WebCore/bindings/js/Dictionary.h >+++ b/Source/WebCore/bindings/js/Dictionary.h >@@ -63,6 +63,7 @@ public: > bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const; > bool getOwnPropertyNames(Vector<String>&) const; > bool getWithUndefinedOrNullCheck(const String& propertyName, String& value) const; >+ void clearException() const; > > private: > template <typename T>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 96614
:
163809
|
164065
|
173253
|
173261
|
173304
|
173306
|
173540
|
177806
|
177865
|
177906
|
177907
|
178728
|
179040
|
179158
|
179326
|
179456