[webkit-help] onload event is never fired

Y.Sanachan sanachan.y at gmail.com
Sat Jan 25 22:33:41 PST 2014


Hi Benjamin,

Thank you for your reply.
I see. I filed this bug as bug 127644. I will attach my patch and test 
case later on.

Best Regards,
Sanachan.

(2014 01 26 5:16), Benjamin Poulain wrote:
> Hi Sanachan,
>
> Please file a bug on bugs.webkit.org. You should attach your patch and a
> test case with the bug.
>
> This mailing list is not the right place to discuss bugs, we prefer to
> have a trace of the discussion on bugzilla.
>
> Regards,
> Benjamin
>
> On 1/25/14, 7:50 AM, Y.Sanachan wrote:
>> 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();
>>
>> As like as the below patch, isn't it necessary to check
>> isDelayingLoadEvent() after onreadystatechange to be fired ?
>> Please give me your opinion.
>>
>> -------------------------------
>> diff --git a/Source/WebCore/loader/FrameLoader.cpp
>> b/Source/WebCore/loader/FrameLoader.cpp
>> index bce07ab..2d3b26e 100644
>> --- a/Source/WebCore/loader/FrameLoader.cpp
>> +++ b/Source/WebCore/loader/FrameLoader.cpp
>> @@ -826,6 +826,11 @@ void FrameLoader::checkCompleted()
>> m_requestedHistoryItem = 0;
>> m_frame.document()->setReadyState(Document::Complete);
>>
>> + if (m_frame.document()->isDelayingLoadEvent()) {
>> + m_isComplete = false;
>> + return;
>> + }
>> +
>> #if PLATFORM(IOS)
>> if (m_frame.document()->url().isEmpty()) {
>> // We need to update the document URL of a PDF document to be non-empty
>> so that both back/forward history navigation
>> -------------------------------
>>
>> Regards,
>> Sanachan.
>>
>> _______________________________________________
>> webkit-help mailing list
>> webkit-help at lists.webkit.org
>> https://lists.webkit.org/mailman/listinfo/webkit-help
>>
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-help
>



More information about the webkit-help mailing list