Closed Bug 865885 Opened 12 years ago Closed 9 years ago

Add a more descriptive name for webworkers

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: BenWa, Assigned: BenWa)

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attachment #751544 - Flags: review?(bent.mozilla)
Comment on attachment 751544 [details] [diff] [review] patch Review of attachment 751544 [details] [diff] [review]: ----------------------------------------------------------------- r=me as long as the reuse case is alright. ::: dom/workers/RuntimeService.cpp @@ +522,5 @@ > } > > JSRuntime* rt = JS_GetRuntime(cx); > > + nsCString escapedDomain(workerPrivate->Domain()); Nit: nsAutoCString @@ +533,5 @@ > + workerName = NS_LITERAL_CSTRING("WebWorker (") + > + escapedDomain + NS_LITERAL_CSTRING(") (") + > + escapedURL + NS_LITERAL_CSTRING(")"); > + > + profiler_register_thread(workerName.BeginReading()); What happens if you call this more than once? Will it just replace the old name? Threads are reused for different workers in some cases.
Attachment #751544 - Flags: review?(bent.mozilla) → review+
(In reply to ben turner [:bent] (gone until July 22) from comment #2) > @@ +533,5 @@ > > + workerName = NS_LITERAL_CSTRING("WebWorker (") + > > + escapedDomain + NS_LITERAL_CSTRING(") (") + > > + escapedURL + NS_LITERAL_CSTRING(")"); > > + > > + profiler_register_thread(workerName.BeginReading()); > > What happens if you call this more than once? Will it just replace the old > name? Threads are reused for different workers in some cases. As long as they run through profiler_unregister_thread then first it should be fine.
Attached patch patchSplinter Review
Attachment #751544 - Attachment is obsolete: true
Attachment #777988 - Flags: review+
This got fixed in another bug. A similar patch has landed.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: