[Webkit-unassigned] [Bug 127644] New: onload event is never fired if script element was added from readystatechange listener

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 25 22:33:54 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=127644

           Summary: onload event is never fired if script element was
                    added from readystatechange listener
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Event Handling
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: sanachan.y at gmail.com


If the functions with the below ordering were called, I think 'onload' event is never fired.

1. FrameLoader::checkCompleted()
2. Document::setReadyState(Document::Complete); -- from checkCompleted()
3. HTMLScriptElement::HTMLScriptElement -- from listener of onreadystatechange
4. ScriptRunner::queueScriptForExecution()
5. Document::incrementLoadEventDelayCount() -- from queueScriptForExecution()
6. Document::checkCallImplicitClose() -- from checkCompleted()
---> But it will return immediately because of Document::isDelayingLoadEvent()==true
7. Document::decrementLoadEventDelayCount() is called and timer fired,
FrameLoader::checkCompleted() will be called. However, m_isComplete is already set to 'true' then
we cannot reach to DOMWindow::dispatchLoadEvent();

I think isDelayingLoadEvent() is necessary to be checked after onreadystatechange to be fired.
Firefox, Chrome v30 (not WebKit) on PC are OK.

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



More information about the webkit-unassigned mailing list