[webkit-reviews] review denied: [Bug 35568] Web Inspector: display list of active workers & support debugging with fake workers : [Attachment 49795] Display list of active workers in scripts panel, allow workers debugging by injecting fake workers implementation (style fixed)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 2 04:49:53 PST 2010


Pavel Feldman <pfeldman at chromium.org> has denied Andrey Kosyakov
<caseq at chromium.org>'s request for review:
Bug 35568: Web Inspector: display list of active workers & support debugging
with fake workers
https://bugs.webkit.org/show_bug.cgi?id=35568

Attachment 49795: Display list of active workers in scripts panel, allow
workers debugging by injecting fake workers implementation (style fixed)
https://bugs.webkit.org/attachment.cgi?id=49795&action=review

------- Additional Comments from Pavel Feldman <pfeldman at chromium.org>
Overall looks good, a bunch of nits below.

> + * Copyright (C) 2009, 2010 Google Inc. All rights reserved.

Make it simply 2010.

>   *
>   * Redistribution and use in source and binary forms, with or without
>   * modification, are permitted provided that the following conditions are
> @@ -213,6 +213,12 @@ JSValue JSInjectedScriptHost::reportDidD
>      return jsUndefined();
>  }
>  
> +pair<long, ScriptObject> InjectedScriptHost::injectScript(const String&
source, ScriptState *scriptState)
> +{
> +    long id = m_nextInjectedScriptId++;
> +    return std::make_pair(id, createInjectedScript(source, this,
scriptState, id));
> +}
> +

This should not be custom (make createInjectedScript static member if
necessary).

> +#if ENABLE(WORKERS)
> +void InjectedScriptHost::didCreateWorker(long id, const String &url, bool
isSharedWorker)

const String& url

> +#if ENABLE(WORKERS)
> +    void didCreateWorker(long id, const String &url, bool isSharedWorker);

ditto

>  
> +    long generateId();

generateId is a bad name since it will conflict with injected script id.
nextWorkerId.


> +void InspectorController::clearWorkers()
> +{
> +    if (m_frontend) {
> +	   WorkersMap::iterator workersEnd = m_workers.end();
> +	   for (WorkersMap::iterator it = m_workers.begin(); it != workersEnd;
++it)
> +	       m_frontend->willDestroyWorker(*it->second);
> +    }
> +    m_workers.clear();
> +}

I don't think you need this method - panel's reset will do tear down on the
front-end side.

> +    template<typename T> void innerDidCreateWorker(HashMap<T,
RefPtr<InspectorWorkerResource> >* map, T id, const String& url, bool
isSharedWorker);
> +    template<typename T> void innerWillDestroyWorker(HashMap<T,
RefPtr<InspectorWorkerResource> >* map, T id);

I think you wanted to get rid of this.
> +   
WebInspector.panels.scripts.sidebarPanes.workers.addWorker.apply(WebInspector.p
anels.scripts.sidebarPanes.workers, arguments);
> +}
> +
> +WebInspector.willDestroyWorker = function()
> +{
> +   
WebInspector.panels.scripts.sidebarPanes.workers.removeWorker.apply(WebInspecto
r.panels.scripts.sidebarPanes.workers, arguments);

You should cache WebInspector.panels.scripts.sidebarPanes.workers.

> +
> +.sidebar-pane-subtitle input[type=checkbox] {

We are already slow. Could you use explicit class for this instead?


>	   EventTargetData m_eventTargetData;
> +	   long m_id;
> +
> +	   static long s_lastWorkerId;

Either m_workerId or s_lastId

> @@ -1,3 +1,23 @@
> +2010-03-02  Andrey Kosyakov	<caseq at chromium.org>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Added addScriptToEvaluateOnLoad() /
removeAllScriptsToEvaluateOnLoad()
> +	   (part of fake workers injection support)
> +	   https://bugs.webkit.org/show_bug.cgi?id=35568
> +
> +	   * src/js/InspectorControllerImpl.js:
> +	   (devtools.InspectorBackendImpl):
> +
> +2010-03-02  Andrey Kosyakov	<caseq at chromium.org>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Need a short description and bug URL (OOPS!)
> +
> +	   * src/js/InspectorControllerImpl.js:
> +	   (devtools.InspectorBackendImpl):
> +
>  2010-03-01  Jakob Petsovits	<jpetsovits at rim.com>

You have 2 entries here.

It would it great to have a test for addScriptToEvaluateOnLoad.


More information about the webkit-reviews mailing list