3 var f = parent.document.getElementsByTagName('iframe')[0]
4 f.onload = function() { if (window.testRunner) testRunner.notifyDone(); }
5 f.src="about:blank"
haraken
2014/05/29 05:50:39
This test is testing the following things.
(1) f.
This test is testing the following things.
(1) f.onload sets the event listener on this frame (say Frame1).
(2) f.src="about:blank" is loaded into this iframe. A new Frame object is
created (say Frame2).
(3) f.onload is called. The test is checking if it doesn't crash.
Before this CL, this sequence was working because when we were invoking f.onload
using the ExecutionContext of Frame2. (i.e.,
V8AbstractEventListener::invokeEventHandler)
After this CL, f.onload is not called because we try to invoke f.onload using
the ExecutionContext of Frame1. This is because we store the current ScriptState
in (1) and use the ScriptState's executionContext in (3). Because the Frame1 is
already gone, we cannot call f.onload. (i.e.,
V8AbstractEventListener::invokeEventHandler returns before invoking the event
listener.)
- I think the new behavior is more reasonable.
- I confirmed that Firefox aligns with the new behavior.
- As far as I know, the behavior is not speced (there is a W3C bug:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24403).
Given the above, this CL makes the behavior change and removes this test
(because this test is no longer testing something meaningful).
Issue 293053007: V8AbstractEventListener should hold a ScriptState
(Closed)
Created 6 years, 7 months ago by haraken
Modified 6 years, 6 months ago
Reviewers: dcarney, adamk, tasak
Base URL: svn://svn.chromium.org/blink/trunk
Comments: 4