IndexedDB: re-enable some leak tests
authorsihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Mar 2019 02:24:55 +0000 (02:24 +0000)
committersihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Mar 2019 02:24:55 +0000 (02:24 +0000)
commit4e51f1ef471c3a20ddd86df65ce7f60a99f6ad95
treea1894abbd0df1118972fb6b4e605979d625a6e02
parent30d289379dffa4813cd763ca34b6181ab7a1857e
IndexedDB: re-enable some leak tests
https://bugs.webkit.org/show_bug.cgi?id=194806

Reviewed by Geoffrey Garen.

Source/WebCore:

Protected JSIDBCursor object when advance/continue request on IDBCursor is not finished, because after the
advance operation completes on success, we need to return the same JSIDBCursor object as before the advance,
and during the wait for advance operation to complete, we need to return error as the result.

Covered by existing tests.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::setGetResult):
(WebCore::IDBCursor::clearWrappers):
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::stop):
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
(WebCore::IDBRequest::setResultToUndefined):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):
(WebCore::IDBRequest::clearWrappers):
* Modules/indexeddb/IDBRequest.h:
(WebCore::IDBRequest::cursorWrapper):
* bindings/js/JSIDBRequestCustom.cpp:
(WebCore::JSIDBRequest::visitAdditionalChildren):
* bindings/js/JSValueInWrappedObject.h:
(WebCore::JSValueInWrappedObject::JSValueInWrappedObject):
(WebCore::JSValueInWrappedObject::operator=):
(WebCore::JSValueInWrappedObject::clear):

LayoutTests:

* TestExpectations:
* platform/win/TestExpectations:
* storage/indexeddb/connection-leak-expected.txt:
* storage/indexeddb/connection-leak-private-expected.txt:
* storage/indexeddb/cursor-leak-expected.txt:
* storage/indexeddb/cursor-leak-private-expected.txt:
* storage/indexeddb/cursor-request-cycle-expected.txt:
* storage/indexeddb/cursor-request-cycle-private-expected.txt:
* storage/indexeddb/request-leak-expected.txt:
* storage/indexeddb/request-leak-private-expected.txt:
* storage/indexeddb/resources/cursor-request-cycle.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/storage/indexeddb/connection-leak-expected.txt
LayoutTests/storage/indexeddb/connection-leak-private-expected.txt
LayoutTests/storage/indexeddb/cursor-leak-expected.txt
LayoutTests/storage/indexeddb/cursor-leak-private-expected.txt
LayoutTests/storage/indexeddb/cursor-request-cycle-expected.txt
LayoutTests/storage/indexeddb/cursor-request-cycle-private-expected.txt
LayoutTests/storage/indexeddb/request-leak-expected.txt
LayoutTests/storage/indexeddb/request-leak-private-expected.txt
LayoutTests/storage/indexeddb/resources/cursor-request-cycle.js
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBCursor.cpp
Source/WebCore/Modules/indexeddb/IDBCursor.h
Source/WebCore/Modules/indexeddb/IDBRequest.cpp
Source/WebCore/Modules/indexeddb/IDBRequest.h
Source/WebCore/bindings/js/JSIDBRequestCustom.cpp
Source/WebCore/bindings/js/JSValueInWrappedObject.h