Bug 141267 - http/tests/misc/detached-frame-console.html is flaky
Summary: http/tests/misc/detached-frame-console.html is flaky
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-04 15:23 PST by Alexey Proskuryakov
Modified: 2016-01-01 17:08 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2015-02-04 15:23:16 PST
http/tests/misc/detached-frame-console.html is flaky. In fact, it fails for me locally when run alone.

run-webkit-tests http/tests/misc/detached-frame-console.html

+CONSOLE MESSAGE: line 13: TypeError: undefined is not an object (evaluating 'w.location.foobar')

This flakiness is due to some strange code in JSDOMWindow::getOwnPropertySlot(). It checks thisObject->impl().frame() to decide whether to expose window.location - but the result of frame() depends on whether the Frame object exists, not on any properly observable state! There is a FIXME in DOMWindow saying that it shouldn't be a FrameDestructionObserver.

If something keeps the Frame alive, then we expose window.location, and when we try to access location.foobar, we get a cross-origin violation. And here again, we seem to print it to a wrong console - it should be in the console of a frame that runs the script, not in the console of the target window.

Once all that is cleaned up, there will probably be no way for the test to verify the original fix (for bug 130991). I tried to make another test that confirms the fix, but didn't succeed yet.