Bug 124296 - Web Inspector: Generate Individual InspectorBackendDispatchers, add base InspectorBackendDispatcher
Summary: Web Inspector: Generate Individual InspectorBackendDispatchers, add base Insp...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-11-13 11:22 PST by Joseph Pecoraro
Modified: 2013-11-13 18:38 PST (History)
7 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (116.11 KB, patch)
2013-11-13 11:58 PST, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff
[BEFORE] InspectorBackendDispatchers.h (44.32 KB, application/octet-stream)
2013-11-13 11:58 PST, Joseph Pecoraro
no flags Details
[BEFORE] InspectorBackendDispatchers.cpp (285.00 KB, application/octet-stream)
2013-11-13 11:58 PST, Joseph Pecoraro
no flags Details
[AFTER] InspectorBackendDispatchers.h (59.67 KB, application/octet-stream)
2013-11-13 11:59 PST, Joseph Pecoraro
no flags Details
[AFTER] InspectorBackendDispatchers.cpp (265.23 KB, application/octet-stream)
2013-11-13 11:59 PST, Joseph Pecoraro
no flags Details
[BOTS] For Bots (116.95 KB, patch)
2013-11-13 18:07 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2013-11-13 11:22:47 PST
With some of the domains moving down into JavaScriptCore, the generated InspectorBackendDispatchers.h cannot know about all domains / methods in advance. Instead make each domain supplemental, and register individual dispatchers with the base dispatcher based on their domain name.
Comment 1 Radar WebKit Bug Importer 2013-11-13 11:23:03 PST
<rdar://problem/15461030>
Comment 2 Joseph Pecoraro 2013-11-13 11:58:00 PST
Created attachment 216831 [details]
[PATCH] Proposed Fix

Bots probably won't apply this, so I'll have to check again later.
Comment 3 Joseph Pecoraro 2013-11-13 11:58:31 PST
Created attachment 216832 [details]
[BEFORE] InspectorBackendDispatchers.h
Comment 4 Joseph Pecoraro 2013-11-13 11:58:47 PST
Created attachment 216833 [details]
[BEFORE] InspectorBackendDispatchers.cpp
Comment 5 Joseph Pecoraro 2013-11-13 11:59:06 PST
Created attachment 216834 [details]
[AFTER] InspectorBackendDispatchers.h
Comment 6 Joseph Pecoraro 2013-11-13 11:59:19 PST
Created attachment 216835 [details]
[AFTER] InspectorBackendDispatchers.cpp
Comment 7 Joseph Pecoraro 2013-11-13 18:07:14 PST
Created attachment 216884 [details]
[BOTS] For Bots
Comment 8 Joseph Pecoraro 2013-11-13 18:08:45 PST
In the most recent patch I added a small snippet of code in CodeGeneratorInspector.py to remove the old generated InspectorBackendDispatcher.{h,cpp}. This is to prevent build breaks on bots and developers machines if a compiler accidentally includes the wrong InspectorBackendDispatcher.{h,cpp} now that we have files of that name in WebCore/inspector.

This code was reviewed by Timothy Hatcher.
Comment 9 WebKit Commit Bot 2013-11-13 18:09:32 PST
Attachment 216884 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/GNUmakefile.list.am', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/inspector/CodeGeneratorInspector.py', u'Source/WebCore/inspector/CodeGeneratorInspectorStrings.py', u'Source/WebCore/inspector/InspectorAgent.cpp', u'Source/WebCore/inspector/InspectorAgent.h', u'Source/WebCore/inspector/InspectorAllInOne.cpp', u'Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp', u'Source/WebCore/inspector/InspectorApplicationCacheAgent.h', u'Source/WebCore/inspector/InspectorBackendDispatcher.cpp', u'Source/WebCore/inspector/InspectorBackendDispatcher.h', u'Source/WebCore/inspector/InspectorCSSAgent.cpp', u'Source/WebCore/inspector/InspectorCSSAgent.h', u'Source/WebCore/inspector/InspectorCanvasAgent.cpp', u'Source/WebCore/inspector/InspectorCanvasAgent.h', u'Source/WebCore/inspector/InspectorConsoleAgent.cpp', u'Source/WebCore/inspector/InspectorConsoleAgent.h', u'Source/WebCore/inspector/InspectorDOMAgent.cpp', u'Source/WebCore/inspector/InspectorDOMAgent.h', u'Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp', u'Source/WebCore/inspector/InspectorDOMDebuggerAgent.h', u'Source/WebCore/inspector/InspectorDOMStorageAgent.cpp', u'Source/WebCore/inspector/InspectorDOMStorageAgent.h', u'Source/WebCore/inspector/InspectorDatabaseAgent.cpp', u'Source/WebCore/inspector/InspectorDatabaseAgent.h', u'Source/WebCore/inspector/InspectorDebuggerAgent.cpp', u'Source/WebCore/inspector/InspectorDebuggerAgent.h', u'Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp', u'Source/WebCore/inspector/InspectorHeapProfilerAgent.h', u'Source/WebCore/inspector/InspectorIndexedDBAgent.cpp', u'Source/WebCore/inspector/InspectorIndexedDBAgent.h', u'Source/WebCore/inspector/InspectorInputAgent.cpp', u'Source/WebCore/inspector/InspectorInputAgent.h', u'Source/WebCore/inspector/InspectorLayerTreeAgent.cpp', u'Source/WebCore/inspector/InspectorLayerTreeAgent.h', u'Source/WebCore/inspector/InspectorMemoryAgent.cpp', u'Source/WebCore/inspector/InspectorMemoryAgent.h', u'Source/WebCore/inspector/InspectorPageAgent.cpp', u'Source/WebCore/inspector/InspectorPageAgent.h', u'Source/WebCore/inspector/InspectorProfilerAgent.cpp', u'Source/WebCore/inspector/InspectorProfilerAgent.h', u'Source/WebCore/inspector/InspectorResourceAgent.cpp', u'Source/WebCore/inspector/InspectorResourceAgent.h', u'Source/WebCore/inspector/InspectorRuntimeAgent.h', u'Source/WebCore/inspector/InspectorTimelineAgent.cpp', u'Source/WebCore/inspector/InspectorTimelineAgent.h', u'Source/WebCore/inspector/InspectorWorkerAgent.cpp', u'Source/WebCore/inspector/InspectorWorkerAgent.h', u'Source/WebCore/inspector/PageRuntimeAgent.cpp', u'Source/WebCore/inspector/PageRuntimeAgent.h', u'Source/WebCore/inspector/WorkerRuntimeAgent.cpp', u'Source/WebCore/inspector/WorkerRuntimeAgent.h']" exit_code: 1
Source/WebCore/inspector/CodeGeneratorInspector.py:1997:  trailing whitespace  [pep8/W291] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.cpp:28:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Source/WebCore/inspector/InspectorBackendDispatcher.h:52:  The parameter name "inspectorFrontendChannel" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:57:  The parameter name "backendDispatcher" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:85:  The parameter name "dispatcher" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:94:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:95:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:96:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:97:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:98:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:99:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:105:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/inspector/InspectorBackendDispatcher.h:105:  The parameter name "defaultValue" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 13 in 54 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Joseph Pecoraro 2013-11-13 18:16:41 PST
> Source/WebCore/inspector/CodeGeneratorInspector.py:1997:  trailing whitespace  [pep8/W291] [5]

Addressed.

> Source/WebCore/inspector/InspectorBackendDispatcher.cpp:28:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]

Good catch style bot! This may have been causing some compile time issues I was seeing. Addressed.

> Source/WebCore/inspector/InspectorBackendDispatcher.h:52:  The parameter name "inspectorFrontendChannel" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:57:  The parameter name "backendDispatcher" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:85:  The parameter name "dispatcher" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:94:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:95:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:96:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:97:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:98:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:99:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:105:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Source/WebCore/inspector/InspectorBackendDispatcher.h:105:  The parameter name "defaultValue" adds no information, so it should be removed.  [readability/parameter_name] [5]

Addressed all but the last of these.
Comment 11 Joseph Pecoraro 2013-11-13 18:23:23 PST
Committed <http://trac.webkit.org/changeset/159268>.
Comment 12 Joseph Pecoraro 2013-11-13 18:38:04 PST
Attempted Windows Build Fix:
<http://trac.webkit.org/changeset/159270>

Forgot to add the file to Windows vcxproj.