[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
Thu Dec 2 23:34:41 PST 2010


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





--- Comment #18 from Ryosuke Niwa <rniwa at webkit.org>  2010-12-02 23:34:40 PST ---
(From update of attachment 75406)
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?

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

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