[Webkit-unassigned] [Bug 222228] New: postMessage changes prototype of basic types

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 20 02:32:42 PST 2021


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

            Bug ID: 222228
           Summary: postMessage changes prototype of basic types
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Mac (Intel)
                OS: macOS 11
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: stefan at sechel.de

Execute this in the current Safari Tech Preview (120):

>window.addEventListener('message', event => {
>  console.log('is Object after postMessage?: ', event.data instanceof Object)
>  console.log('is Array after postMessage?: ', event.data.array instanceof Array)
>})
>const testObject = {
>  array: [ 1, 2, 3, 4 ]
>};
>console.log('is Object before postMessage?: ', testObject instanceof Object)
>console.log('is Array before postMessage?: ', testObject.array instanceof Array)
>window.postMessage(testObject);

This probably extends to other build-in types like Map, Set, ArrayBuffer and the like...
This applies to Safari Tech Preview 120 and is not present in Safari 14.0.3.

-- 
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/20210220/6763ec52/attachment.htm>


More information about the webkit-unassigned mailing list