RESOLVED FIXED Bug 65292
Serialization of JavaScript values does not appear to respect new HTML5 Structured Clone semantics
https://bugs.webkit.org/show_bug.cgi?id=65292
Summary Serialization of JavaScript values does not appear to respect new HTML5 Struc...
Luke Zarko
Reported 2011-07-27 15:49:08 PDT
The layout tests at fast/dom/Window/window-postmessage-clone.html and fast/dom/Window/window-postmessage-clone-really-deep-array.html differ from the expected results in platform/chromium (both with the integration of the patch for https://bugs.webkit.org/show_bug.cgi?id=65286). Ideally the platform-specific expectations should be eliminated and the behavior of all platforms would be harmonized.
Attachments
Patch (15.78 KB, patch)
2012-08-22 14:06 PDT, Chris Dumez
buildbot: commit-queue-
Patch (16.34 KB, patch)
2012-08-22 14:52 PDT, Chris Dumez
buildbot: commit-queue-
Patch (16.26 KB, patch)
2012-08-22 15:36 PDT, Chris Dumez
buildbot: commit-queue-
Patch (15.87 KB, patch)
2012-08-23 00:25 PDT, Chris Dumez
buildbot: commit-queue-
Patch (19.93 KB, patch)
2012-08-23 01:25 PDT, Chris Dumez
buildbot: commit-queue-
Patch (21.84 KB, patch)
2012-08-23 02:43 PDT, Chris Dumez
no flags
Patch (19.77 KB, patch)
2012-08-23 03:03 PDT, Chris Dumez
no flags
Patch (20.10 KB, patch)
2012-08-23 03:56 PDT, Chris Dumez
no flags
Archive of layout-test-results from gce-cr-linux-03 (638.61 KB, application/zip)
2012-08-23 04:41 PDT, WebKit Review Bot
no flags
Patch (20.68 KB, patch)
2012-08-23 11:38 PDT, Chris Dumez
no flags
David Levin
Comment 1 2011-07-27 15:53:02 PDT
This is about a fix that needs to happen the structured clone implementation in bindings/js.
Luke Zarko
Comment 2 2011-08-08 15:19:45 PDT
The legacy behavior for postMessage differs between Chrome and Safari for https://bugs.webkit.org/show_bug.cgi?id=65209 -- where Chrome forbids MessagePorts from appearing within a message, Safari allows it but serializes them as plain Objects.
Chris Dumez
Comment 3 2012-08-22 14:06:47 PDT
Oliver Hunt
Comment 4 2012-08-22 14:20:17 PDT
Comment on attachment 160008 [details] Patch Are the posted String/Boolean/Number objects expected to transfer expands? (a la Arrays) Also this appears to result in breaking object identity semantics. eg. foo=new String(s); bar = {a:foo, b:foo}; postMessage(bar) will produce an object with data.a !== data.b despite bar.a === bar.b If this is expected behaviour according to the spec i would consider it a spec bug.
Build Bot
Comment 5 2012-08-22 14:42:44 PDT
Chris Dumez
Comment 6 2012-08-22 14:52:26 PDT
Created attachment 160014 [details] Patch Attempt to fix Windows build.
Build Bot
Comment 7 2012-08-22 15:25:48 PDT
Chris Dumez
Comment 8 2012-08-22 15:36:25 PDT
Created attachment 160023 [details] Patch Another attempt to fix Windows build.
Build Bot
Comment 9 2012-08-22 16:26:39 PDT
Build Bot
Comment 10 2012-08-22 16:31:05 PDT
Chris Dumez
Comment 11 2012-08-23 00:25:39 PDT
Created attachment 160100 [details] Patch Attempt to fix mac/win builds.
Build Bot
Comment 12 2012-08-23 00:59:50 PDT
Chris Dumez
Comment 13 2012-08-23 01:25:16 PDT
Created attachment 160111 [details] Patch Export a few JSC symbols for Mac and Win.
Build Bot
Comment 14 2012-08-23 01:57:47 PDT
Chris Dumez
Comment 15 2012-08-23 02:19:19 PDT
(In reply to comment #14) > (From update of attachment 160111 [details]) > Attachment 160111 [details] did not pass mac-ews (mac): > Output: http://queues.webkit.org/results/13559648 I added the symbols to Source/JavaScriptCore/JavaScriptCore.order. Any idea why I'm still getting linking errors on Mac?
Mikhail Pozdnyakov
Comment 16 2012-08-23 02:26:13 PDT
(In reply to comment #15) > (In reply to comment #14) > > (From update of attachment 160111 [details] [details]) > > Attachment 160111 [details] [details] did not pass mac-ews (mac): > > Output: http://queues.webkit.org/results/13559648 > I added the symbols to Source/JavaScriptCore/JavaScriptCore.order. Any idea why I'm still getting linking errors on Mac? To export symbols from core you should add them to Source/WebCore/WebCore.exp.in
Chris Dumez
Comment 17 2012-08-23 02:29:02 PDT
(In reply to comment #16) > (In reply to comment #15) > > (In reply to comment #14) > > > (From update of attachment 160111 [details] [details] [details]) > > > Attachment 160111 [details] [details] [details] did not pass mac-ews (mac): > > > Output: http://queues.webkit.org/results/13559648 > > I added the symbols to Source/JavaScriptCore/JavaScriptCore.order. Any idea why I'm still getting linking errors on Mac? > > To export symbols from core you should add them to Source/WebCore/WebCore.exp.in AFAIK, WebCore.exp.in is used to export symbols from WebCore to WebKit API. In my case, I need to export symbols from JavaScriptCore to WebCore.
Chris Dumez
Comment 18 2012-08-23 02:43:39 PDT
Created attachment 160120 [details] Patch Export several JSC symbols, hopefully fixing Mac build.
Kentaro Hara
Comment 19 2012-08-23 02:44:13 PDT
This page might be helpful for you: http://trac.webkit.org/wiki/ExportingSymbols
Chris Dumez
Comment 20 2012-08-23 03:03:26 PDT
Created attachment 160121 [details] Patch Clean up the symbols export based on the wiki page Haraken provided (Thanks!)
Chris Dumez
Comment 21 2012-08-23 03:52:23 PDT
Comment on attachment 160121 [details] Patch Will handle the object identify issue reported by Oliver.
Chris Dumez
Comment 22 2012-08-23 03:56:19 PDT
Created attachment 160126 [details] Patch Fix the object identity issue mentionned by Oliver.
WebKit Review Bot
Comment 23 2012-08-23 04:41:17 PDT
Comment on attachment 160126 [details] Patch Attachment 160126 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13563636 New failing tests: animations/suspend-resume-animation-events.html
WebKit Review Bot
Comment 24 2012-08-23 04:41:21 PDT
Created attachment 160128 [details] Archive of layout-test-results from gce-cr-linux-03 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-03 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Chris Dumez
Comment 25 2012-08-23 04:43:36 PDT
Comment on attachment 160126 [details] Patch Chrome warning seems unrelated. Setting cq? again.
Chris Dumez
Comment 26 2012-08-23 11:38:06 PDT
Created attachment 160204 [details] Patch Bump CurrentVersion in SerializedScriptValue.cpp as requested on IRC.
WebKit Review Bot
Comment 27 2012-08-23 12:08:32 PDT
Comment on attachment 160204 [details] Patch Clearing flags on attachment: 160204 Committed r126464: <http://trac.webkit.org/changeset/126464>
WebKit Review Bot
Comment 28 2012-08-23 12:08:38 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.