Title: [164062] trunk
Revision
164062
Author
[email protected]
Date
2014-02-13 15:04:30 -0800 (Thu, 13 Feb 2014)

Log Message

IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
https://bugs.webkit.org/show_bug.cgi?id=128763

Reviewed by Anders Carlsson.

Source/WebCore:

No new tests (Covered by three existing tests)

* platform/KeyedCoding.h:
(WebCore::KeyedEncoder::encodeObjects): If the array is empty we still have to begin() and end() it.

LayoutTests:

* platform/mac-wk2/TestExpectations: One test passes, one passes with expectation changes,
  and the third is now a text failure.

* storage/indexeddb/key-type-array-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (164061 => 164062)


--- trunk/LayoutTests/ChangeLog	2014-02-13 23:02:31 UTC (rev 164061)
+++ trunk/LayoutTests/ChangeLog	2014-02-13 23:04:30 UTC (rev 164062)
@@ -1,3 +1,15 @@
+2014-02-13  Brady Eidson  <[email protected]>
+
+        IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
+        https://bugs.webkit.org/show_bug.cgi?id=128763
+
+        Reviewed by Anders Carlsson.
+
+        * platform/mac-wk2/TestExpectations: One test passes, one passes with expectation changes,
+          and the third is now a text failure.
+
+        * storage/indexeddb/key-type-array-expected.txt:
+
 2014-02-13  Yuki Sekiguchi  <[email protected]>
 
         [css3-text] Support -webkit-text-decoration-skip: objects

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (164061 => 164062)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2014-02-13 23:02:31 UTC (rev 164061)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2014-02-13 23:04:30 UTC (rev 164062)
@@ -467,6 +467,7 @@
 storage/indexeddb/cursor-continue-validity.html [ Skip ]
 storage/indexeddb/cursor-continueprimarykey.html [ Skip ]
 storage/indexeddb/cursor-index-delete.html [ Skip ]
+storage/indexeddb/cursor-key-order.html [ Skip ]
 storage/indexeddb/cursor-leak.html [ Skip ] # Missing needed WKTR feature?
 storage/indexeddb/cursor-overloads.html [ Skip ]
 storage/indexeddb/cursor-primary-key-order.html [ Skip ]
@@ -549,11 +550,6 @@
 storage/indexeddb/prefetch-invalidation.html [ Skip ]
 storage/indexeddb/queued-commands.html [ Skip ]
 
-# Blink tests that crash the DatabaseProcess under KeyedDecoder::~KeyedDecoder.
-storage/indexeddb/cursor-key-order.html [ Skip ]
-storage/indexeddb/key-type-array.html [ Skip ]
-storage/indexeddb/lazy-index-types.html [ Skip ]
-
 # Blink tests that pass once, but are known to cause trouble downstream.
 storage/indexeddb/clone-exception.html [ Skip ]
 storage/indexeddb/connection-leak.html [ Skip ]

Modified: trunk/LayoutTests/storage/indexeddb/key-type-array-expected.txt (164061 => 164062)


--- trunk/LayoutTests/storage/indexeddb/key-type-array-expected.txt	2014-02-13 23:02:31 UTC (rev 164061)
+++ trunk/LayoutTests/storage/indexeddb/key-type-array-expected.txt	2014-02-13 23:04:30 UTC (rev 164062)
@@ -170,112 +170,112 @@
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ true ]
 Expecting exception from store.put('value', [ true ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ false ]
 Expecting exception from store.put('value', [ false ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ NaN ]
 Expecting exception from store.put('value', [ NaN ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ null ]
 Expecting exception from store.put('value', [ null ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ {} ]
 Expecting exception from store.put('value', [ {} ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ function () {} ]
 Expecting exception from store.put('value', [ function () {} ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ /regex/ ]
 Expecting exception from store.put('value', [ /regex/ ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ self ]
 Expecting exception from store.put('value', [ self ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ self.document ]
 Expecting exception from store.put('value', [ self.document ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: [ self.document.body ]
 Expecting exception from store.put('value', [ self.document.body ]);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: cyclic_array
 Expecting exception from store.put('value', cyclic_array);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: cyclic_array2
 Expecting exception from store.put('value', cyclic_array2);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: cyclic_array3
 Expecting exception from store.put('value', cyclic_array3);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: cyclic_array4
 Expecting exception from store.put('value', cyclic_array4);
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 testing invalid array key: Array(1000)
 Expecting exception from store.put('value', Array(1000));
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 PASS indexedDB.cmp(makeArrayOfDepth(25), 0) is 1
 PASS indexedDB.cmp(makeArrayOfDepth(250), 0) is 1
@@ -283,7 +283,7 @@
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Exception message: DataError: DOM IDBDatabase Exception 0
 
 PASS successfullyParsed is true
 

Modified: trunk/Source/WebCore/ChangeLog (164061 => 164062)


--- trunk/Source/WebCore/ChangeLog	2014-02-13 23:02:31 UTC (rev 164061)
+++ trunk/Source/WebCore/ChangeLog	2014-02-13 23:04:30 UTC (rev 164062)
@@ -1,3 +1,15 @@
+2014-02-13  Brady Eidson  <[email protected]>
+
+        IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
+        https://bugs.webkit.org/show_bug.cgi?id=128763
+
+        Reviewed by Anders Carlsson.
+
+        No new tests (Covered by three existing tests)
+
+        * platform/KeyedCoding.h:
+        (WebCore::KeyedEncoder::encodeObjects): If the array is empty we still have to begin() and end() it.
+
 2014-02-13  Yuki Sekiguchi  <[email protected]>
 
         [css3-text] Support -webkit-text-decoration-skip: objects

Modified: trunk/Source/WebCore/platform/KeyedCoding.h (164061 => 164062)


--- trunk/Source/WebCore/platform/KeyedCoding.h	2014-02-13 23:02:31 UTC (rev 164061)
+++ trunk/Source/WebCore/platform/KeyedCoding.h	2014-02-13 23:04:30 UTC (rev 164062)
@@ -146,9 +146,6 @@
     template<typename T, typename F>
     void encodeObjects(const String& key, T begin, T end, F&& function)
     {
-        if (begin == end)
-            return;
-
         beginArray(key);
         for (T it = begin; it != end; ++it) {
             beginArrayElement();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to