[Webkit-unassigned] [Bug 17099] Add Mozilla tests for postMessage, fix bugs they reveal

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 9 19:42:43 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=17099





------- Comment #10 from jwalden+bwo at mit.edu  2008-05-09 19:42 PDT -------
(In reply to comment #9)
> I was not able to reproduce this issue on the latest nightly.

I think I was mistaken.  The first test that demonstrated this was succumbing
to a previous error that snowballed and claimed to have received the wrong
origin, but it was switching on a flawed .data property to determine it had
received the wrong origin.  The second test is this one:

http://localhost:8888/tests/dom/tests/mochitest/whatwg/test_postMessage_onOther.html

The failure I get is:

not ok - unexpected origin got "http://example.com", expected
"http://test1.example.com"

Either what's happening here is that document.domain is being used or (more
likely given your example) the method used to determine the origin of the
caller doesn't know that when A.bar() calls B.baz(), where baz was defined
inside a script included by B's document, and B.baz() then calls postMessage,
the origin to use is B's origin (more precisely, the origin of baz()) and not
the origin of A (more precisely, A.bar()).  I think I recall seeing the latter
at one other time when I was comparing tests against another implementation, so
I'm betting the latter is the real problem.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list