[Webkit-unassigned] [Bug 40425] Web Inspector: provide API for content scripts to interact with the inspector

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 30 10:52:41 PDT 2010


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





--- Comment #26 from Andrey Kosyakov <caseq at chromium.org>  2010-07-30 10:52:41 PST ---
> The discardInjectedScripts() logic does not change with this patch. We used to skip it if ether (a) inspector is not enabled, (b) frontend is not attached, or (c) the event comes for a subframe. I'm just inserting my code between (a) and (b). Actually, I think (a) is redundant both for injection of scriptsToEvaluateOnLoad and discardInjectedScripts(), as both are supposed to be a NOP in this case -- so we _could_ discard in early return as well (or remove the check altogether), but my idea was to leave the discardInjectedScripts() logic intact -- just in case.

Ugh, sorry, I realized that you refer to second return as early return and imply that we may be clearing the ids of injected scripts we just created under certain circumstances. Well, this should not cause problems as the ids of this sort of injected scripts are never used, but I agree it would be better to do this consistently. I think we'll change this to

if (enabled()) {
    if (m_frontend && frame == m_inspectedPage->mainFrame())
        m_injectedScriptHost->discardInjectedScripts();

    // inject m_scriptsToEvaluateOnLoad() here.
}

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