[Webkit-unassigned] [Bug 35568] Web Inspector: display list of active workers & support debugging with fake workers
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 2 04:49:54 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=35568
Pavel Feldman <pfeldman at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #49795|review? |review-
Flag| |
--- Comment #5 from Pavel Feldman <pfeldman at chromium.org> 2010-03-02 04:49:53 PST ---
(From update of attachment 49795)
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.panels.scripts.sidebarPanes.workers, arguments);
> +}
> +
> +WebInspector.willDestroyWorker = function()
> +{
> + WebInspector.panels.scripts.sidebarPanes.workers.removeWorker.apply(WebInspector.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.
--
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