[Webkit-unassigned] [Bug 185906] Unexpected constructor / instanceof behavior when retrieving indexedDB data in an iframe

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 23 12:49:45 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=185906

John Vilk <jvilk at cs.umass.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvilk at cs.umass.edu

--- Comment #1 from John Vilk <jvilk at cs.umass.edu> ---
Created attachment 341118

  --> https://bugs.webkit.org/attachment.cgi?id=341118&action=review

Minimal test case

I have attached a minimal test case that demonstrates the issue.

Note: You cannot run this from a file:// URL, as those cannot create IndexedDB databases. I believe Safari also restricts IndexedDB databases in private browsing mode, so it must be a regular browser window.

Expected output (in console) (you see this output in Chrome and Firefox):

Testing in main context!
result.array instanceof Array: true
result.array instanceof window.top.Array: true
Array.isArray(result.array): true
result.arrayBuffer instanceof ArrayBuffer: true
result.arrayBuffer instanceof window.top.ArrayBuffer: true
Testing in iframe context!
result.array instanceof Array: true
result.array instanceof window.top.Array: false
Array.isArray(result.array): true
result.arrayBuffer instanceof ArrayBuffer: true
result.arrayBuffer instanceof window.top.ArrayBuffer: false
test complete.


Actual output:

[Log] Testing in main context! (idb_bug.html, line 36)
[Log] result.array instanceof Array: true (idb_bug.html, line 23)
[Log] result.array instanceof window.top.Array: true (idb_bug.html, line 24)
[Log] Array.isArray(result.array): true (idb_bug.html, line 25)
[Log] result.arrayBuffer instanceof ArrayBuffer: true (idb_bug.html, line 26)
[Log] result.arrayBuffer instanceof window.top.ArrayBuffer: true (idb_bug.html, line 27)
[Log] Testing in iframe context! (about:srcdoc, line 30)
[Log] result.array instanceof Array: false (about:srcdoc, line 19)
[Log] result.array instanceof window.top.Array: true (about:srcdoc, line 20)
[Log] Array.isArray(result.array): true (about:srcdoc, line 21)
[Log] result.arrayBuffer instanceof ArrayBuffer: false (about:srcdoc, line 22)
[Log] result.arrayBuffer instanceof window.top.ArrayBuffer: true (about:srcdoc, line 23)
[Log] test complete. (about:srcdoc, line 30)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180523/12092891/attachment-0001.html>


More information about the webkit-unassigned mailing list