Summary: | Web Inspector: Should be able to display a name for a Worker | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||||
Status: | RESOLVED DUPLICATE | ||||||||
Severity: | Normal | CC: | cdumez, commit-queue, eoconnor, esprehn+autocc, hi, inspector-bugzilla-changes, joepeck, keith_miller, kondapallykalyan, mark.lam, msaboff, rniwa, saam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=172016 https://bugs.webkit.org/show_bug.cgi?id=188779 |
||||||||
Bug Depends on: | 188779 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Joseph Pecoraro
2016-11-11 23:53:19 PST
Created attachment 294810 [details]
[PATCH] Proposed Fix
This adds a `attribute DOMString name;` to Worker.idl. I'll have to discuss how/if we should go about standardizing this.
Created attachment 294811 [details]
[IMAGE] Named Workers
Sidebar shows Named and Unnamed workers (defaults to a display name for the URL).
Comment on attachment 294810 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=294810&action=review > Source/WebInspectorUI/UserInterface/Views/WorkerTreeElement.js:175 > + _nameUpdated(event) > + { > + this._updateTitles(); > + } When this happens we need to resort this among its siblings. Also if Thread Line Indicators land this patch would need to be updated to update those. Going to clear the review on the until we go through some standardization process. I'm also going to break out useful parts of this (Like moving WorkerTarget and MainTarget into their own file) as cleanup now, because I liked it and I've been missing it! Looks like this made standardization progress: https://github.com/whatwg/html/issues/2477 https://github.com/whatwg/html/pull/2664#issuecomment-300692176 Solution was a name property on an options dictionary: var worker = new Worker("worker.js", {name: "Foo Worker"}); I think it also sets the `self.name` within the Worker scope. assert( self.name === "Foo Worker" ); So, I should be able to move forward with this. *** This bug has been marked as a duplicate of bug 211244 *** (In reply to Devin Rousso from comment #7) > > *** This bug has been marked as a duplicate of bug 211244 *** \o/ |