[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 09:49:58 PDT 2010


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





--- Comment #24 from Joseph Pecoraro <joepeck at webkit.org>  2010-07-30 09:49:57 PST ---
(From update of attachment 63061)
> Index: WebCore/inspector/InspectorController.cpp
> ===================================================================
> -    if (!enabled() || !m_frontend || frame != m_inspectedPage->mainFrame())
> +    if (!enabled())
> +        return;
> +
> +    if (m_scriptsToEvaluateOnLoad.size()) {
> +        ScriptState* scriptState = mainWorldScriptState(frame);
> +        for (Vector<String>::iterator it = m_scriptsToEvaluateOnLoad.begin();
> +             it != m_scriptsToEvaluateOnLoad.end(); ++it) {
> +            m_injectedScriptHost->injectScript(*it, scriptState);
> +        }
> +    }
> +
> +    if (!m_frontend || frame != m_inspectedPage->mainFrame())
>          return;
>      m_injectedScriptHost->discardInjectedScripts();
>  }

Minor point, which shouldn't prevent landing.
This still doesn't look right to me. It looks like:

  1. if its disabled leave.
  2. inject scripts.
  3. if there is no frontend, leave.
  4. discard injected scripts map.

It could be we just don't need the injected scripts any more,
but if that is the case shouldn't we discard in the early return
as well?

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