[webkit-dev] Is this a possible source of test flakiness?

Adam Barth abarth at webkit.org
Mon Feb 21 15:47:54 PST 2011


On Mon, Feb 21, 2011 at 3:42 PM, Darin Adler <darin at apple.com> wrote:
> On Feb 20, 2011, at 8:19 PM, Xianzhu Wang wrote:
>> My question is: Is this kind of usage (referencing a later-defined function in onload event handler) correct in theory?
>
> Yes.
>
> The contents of the onload attribute don’t matter until the load event fires, which is after the script element has been parsed.
>
>> Will it cause flakiness?
>
> No.

In theory, it could, right?  If there was a network packet break
between the two and the parser returned to the main event loop and the
scheduler loaded the iframe load first.  Seems unlikely but possible.

Adam


More information about the webkit-dev mailing list