[Webkit-unassigned] [Bug 50115] Please implement async=false for dynamic script loading (REGRESSION: LABjs is broken)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 3 11:35:12 PST 2010


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





--- Comment #21 from James Simonsen <simonjam at chromium.org>  2010-12-03 11:35:11 PST ---
(In reply to comment #18)
> (From update of attachment 75406 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=75406&action=review
> 
> > WebCore/dom/ScriptRunner.cpp:47
> > +        m_scriptsToExecuteSoon[i].first->element()->deref(); // Balances ref() in executeScriptSoon().
> > +        m_document->decrementLoadEventDelayCount();
> 
> I really don't like the fact we're calling ref/deref all over the places.  It's very error prone.  Can't we just use RefPtr or that's too expensive because of Vector operations?

Done.

I copied it from the async script handling. I assumed the Vector operations were the reason it was originally done with ref/deref.

> > WebCore/dom/ScriptRunner.cpp:113
> > +        m_scriptsToExecuteInOrder[0].first->execute(m_scriptsToExecuteInOrder[0].second.get());
> > +        m_scriptsToExecuteInOrder[0].first->element()->deref(); // Balances ref() in executeScriptSoon().
> > +        m_document->decrementLoadEventDelayCount();
> > +        m_scriptsToExecuteInOrder.remove(0);
> 
> Is it really safe to remove the first script after executing the script?

Yeah, it's the same as the async case, which removes the scripts after executing them too.

-- 
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