Title: [134069] trunk/Source/WebCore
Revision
134069
Author
[email protected]
Date
2012-11-09 07:56:58 -0800 (Fri, 09 Nov 2012)

Log Message

Need to clear exception in JSDictionary that might have been caused by previous operation.
https://bugs.webkit.org/show_bug.cgi?id=96614

Reviewed by George Staikos.

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.
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::getWithUndefinedOrNullCheck):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134068 => 134069)


--- trunk/Source/WebCore/ChangeLog	2012-11-09 15:49:46 UTC (rev 134068)
+++ trunk/Source/WebCore/ChangeLog	2012-11-09 15:56:58 UTC (rev 134069)
@@ -1,3 +1,21 @@
+2012-11-09  Charles Wei  <[email protected]>
+
+        Need to clear exception in JSDictionary that might have been caused by previous operation.
+        https://bugs.webkit.org/show_bug.cgi?id=96614
+
+        Reviewed by George Staikos.
+
+        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.
+        * bindings/js/JSDictionary.cpp:
+        (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
+
 2012-11-09  Keishi Hattori  <[email protected]>
 
         Month/week picker should submit month/week string

Modified: trunk/Source/WebCore/bindings/js/JSDictionary.cpp (134068 => 134069)


--- trunk/Source/WebCore/bindings/js/JSDictionary.cpp	2012-11-09 15:49:46 UTC (rev 134068)
+++ trunk/Source/WebCore/bindings/js/JSDictionary.cpp	2012-11-09 15:56:58 UTC (rev 134069)
@@ -216,6 +216,11 @@
 {
     ASSERT(isValid());
     JSValue value;
+
+    // FIXME: This check should be moved to the head of JSDictionary::tryGetProperty(propertyName, JSValue&)
+    // Currently we can't move the check there because it seems breaks some Qt/EFL tests for some reason.
+    if (m_exec->hadException()) // Clear exceptions that might have been caused by previous query.
+        m_exec->clearException();
     if (tryGetProperty(propertyName.utf8().data(), value) != PropertyFound || value.isUndefinedOrNull())
         return false;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to