Bug 151848

Summary: Web Inspector: Remove untested and unused Worker inspection
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 127634    
Attachments:
Description Flags
[PATCH] Proposed Fix
none
[PATCH] Proposed Fix
none
[PATCH] Proposed Fix bburg: review+, bburg: commit-queue-

Description Joseph Pecoraro 2015-12-03 20:48:34 PST
* SUMMARY
Remove untested and unused Worker inspection.

* NOTES
The inspector frontend currently doesn't expose UI for debugging workers, so this code has been maintained for a few years without any way for a user to access it. Likewise, some pieces were implemented in V8 and not implemented in JavaScriptCore so it is possible that if tested some pieces would not be fully functional. Rather then keep the code in half-maintained, lets remove it and re-add it when we will focus on adding proper Worker Inspection.

See:
<https://webkit.org/b/127634> Web Inspector: support debugging web workers
Comment 1 Radar WebKit Bug Importer 2015-12-03 20:49:21 PST
<rdar://problem/23755748>
Comment 2 Joseph Pecoraro 2015-12-03 20:50:10 PST
Created attachment 266592 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2015-12-03 21:01:08 PST
Created attachment 266593 [details]
[PATCH] Proposed Fix

Rebased.
Comment 4 WebKit Commit Bot 2015-12-03 21:02:20 PST
Attachment 266593 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Joseph Pecoraro 2015-12-03 21:07:48 PST
Created attachment 266596 [details]
[PATCH] Proposed Fix
Comment 6 BJ Burg 2015-12-04 08:38:49 PST
Comment on attachment 266596 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=266596&action=review

r=me with some nits.

> Source/JavaScriptCore/inspector/protocol/Worker.json:-8
> -        },

Please update the legacy protocol files as well.

> Source/WebCore/WebCore.vcxproj/WebCore.vcxproj:-19059
> -    <ClCompile Include="..\bindings\js\WorkerScriptDebugServer.cpp">

You don't need to modify the vcxproj files, they aren't used by anything.

> Source/WebCore/inspector/InspectorConsoleInstrumentation.h:-47
> -inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* workerGlobalScope, std::unique_ptr<Inspector::ConsoleMessage> message)

Why not remove this method entirely?

> Source/WebCore/inspector/InspectorTimelineAgent.h:95
> +    enum InspectorType { PageInspector };

Might as well nuke this enum too.

> Source/WebCore/inspector/InspectorWebAgentBase.h:58
>  

Should we sink PageAgentContext into WebAgentContext, or keep this around for the future?

> Source/WebCore/inspector/WorkerDebuggerAgent.h:-42
> -class WorkerDebuggerAgent final : public WebDebuggerAgent {

Let's mark WebDebuggerAgent (as well as other similar sibling classes) as final.
Comment 7 Joseph Pecoraro 2015-12-04 10:26:47 PST
(In reply to comment #6)
> Comment on attachment 266596 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=266596&action=review
> 
> r=me with some nits.

Thanks!

> > Source/JavaScriptCore/inspector/protocol/Worker.json:-8
> > -        },
> 
> Please update the legacy protocol files as well.

Okay.

> > Source/WebCore/WebCore.vcxproj/WebCore.vcxproj:-19059
> > -    <ClCompile Include="..\bindings\js\WorkerScriptDebugServer.cpp">
> 
> You don't need to modify the vcxproj files, they aren't used by anything.

Yeah, but as long as the files exist I'm going to update them.


> > Source/WebCore/inspector/InspectorConsoleInstrumentation.h:-47
> > -inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* workerGlobalScope, std::unique_ptr<Inspector::ConsoleMessage> message)
> 
> Why not remove this method entirely?

I think it would be a good starting point to get console.log working within a Worker without adding complete Worker inspection.


> > Source/WebCore/inspector/InspectorWebAgentBase.h:58
> >  
> 
> Should we sink PageAgentContext into WebAgentContext, or keep this around
> for the future?

Keep it around. If we can't get to Worker support soon, then maybe, but I'm optimistic.


> > Source/WebCore/inspector/WorkerDebuggerAgent.h:-42
> > -class WorkerDebuggerAgent final : public WebDebuggerAgent {
> 
> Let's mark WebDebuggerAgent (as well as other similar sibling classes) as
> final.

Where there was a "Web" there was normally a "Page" and "Worker".
Comment 8 Joseph Pecoraro 2015-12-04 10:53:11 PST
<http://trac.webkit.org/changeset/193426>
Comment 9 Brent Fulgham 2016-07-13 13:23:43 PDT
*** Bug 148642 has been marked as a duplicate of this bug. ***