Bug 40329

Summary: postMessage should serialise dom objects to null by default
Product: WebKit Reporter: Kim Grönholm <kim.1.gronholm>
Component: New BugsAssignee: Oliver Hunt <oliver>
Status: ASSIGNED ---    
Severity: Normal CC: hausmann, kim.1.gronholm, laszlo.gombos, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 39757    
Attachments:
Description Flags
Removes the test case with wrong expected output ap: review-

Description Kim Grönholm 2010-06-08 13:28:16 PDT
Internal structured cloning algorithm should result in null when attempting to
serialise Dom objects that are not real JS objects.

This is not the case currently as can be seen in the test:
LayoutTests/fast/dom/Window/window-postmessage-clone.html

Also the expected output of the layout test is wrong.
Comment 1 Kim Grönholm 2010-06-08 13:35:32 PDT
*** Bug 40232 has been marked as a duplicate of this bug. ***
Comment 2 Kim Grönholm 2010-06-16 11:31:10 PDT
Created attachment 58911 [details]
Removes the test case with wrong expected output

Temporarily disabling the postMessage(window, "*") test as the expected
result and the behavior are both wrong. This doesn't fix the actual
issue but prevents the test case from failing due to any unrelated changes. 
The test case should be enabled again with correct expected output after
the bug has been fixed.
Comment 3 Alexey Proskuryakov 2010-06-17 15:17:18 PDT
From IRC discussion: 
- currently, the subtest raises "TypeError: Cannot post cyclic structures";
- with an unrelated patch, a different exception is raised, because the order of traversal changes;
- the correct behavior is to return null.
Comment 4 Alexey Proskuryakov 2010-06-17 15:21:50 PDT
Comment on attachment 58911 [details]
Removes the test case with wrong expected output

It's best to keep this subtest to make sure that we don't break window serialization even more (e.g. that we don't start to crash).

I think that the best way to proceed is to change this subtest's results in the same unrelated change that will affect it.