Unexpected constructor / instanceof behavior when retrieving indexedDB data in an...
authorsihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 18:41:48 +0000 (18:41 +0000)
committersihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 18:41:48 +0000 (18:41 +0000)
commit51a9fc1925b40b2859b7052db97fc0becf2b481f
treea9f579104d5ffb374cb3119d0a7ada0a1cf219cb
parent11b75411bb5bf089e655ce7348612460171d9b7e
Unexpected constructor / instanceof  behavior when retrieving indexedDB data in an iframe
https://bugs.webkit.org/show_bug.cgi?id=185906
<rdar://problem/40583100>

Reviewed by Geoffrey Garen.

Source/WebCore:

ScriptExecutionContext::execState() returned state of main frame, so deserialization of
IDBValue in iframe used constructors of main frame, which is wrong.

Test: storage/indexeddb/instanceof-iframe.html

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::execState):

LayoutTests:

* storage/indexeddb/instanceof-iframe-expected.txt: Added.
* storage/indexeddb/instanceof-iframe.html: Added.
* storage/indexeddb/resources/instanceof-iframe.js: Added.
(test.else.shouldBe):
(test.else.shouldBeTrue):
(test.else.shouldBeFalse):
(test.else.evalAndLog):
(test):
(callback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/instanceof-iframe-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/instanceof-iframe.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/resources/instanceof-iframe.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/ScriptExecutionContext.cpp