Created attachment 39878 [details] Test case I encountered this bug after trying to clean up LayoutTests\fast\dom\frame-loading-via-document-write.html The problem occurs when two frames are populated using document write and they both refer to the same image and the image is not cached. In that case the onload event of the second frame happens before the image is loaded. I'm attaching a simplified test case. First time it is run it generates load events in the wrong order. Subsequent runs are OK, most likely due to things being cached.
<rdar://problem/7241342>
FWIW, the patch on bug 44894 makes fast/dom/frame-loading-via-document-write.html more reliable (and not trigger this bug), though I agree that it should still be fixed.
*** This bug has been marked as a duplicate of bug 18762 ***