Closed Bug 1196157 Opened 9 years ago Closed 9 years ago

Marks left by performance marks should print the domain of the application and not the complete URL

Categories

(Core :: DOM: Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
FxOS-S6 (04Sep)
Tracking Status
firefox43 --- fixed

People

(Reporter: salva, Assigned: salva)

References

Details

Attachments

(1 file, 1 obsolete file)

Follow up of bug 1186880. Marks left by performance API in workers should follow the same pattern as in the main thread.
Comment on attachment 8649786 [details] [diff] [review]
Obtaining the host for the worker script to include into the performance marks

Review of attachment 8649786 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/workers/Performance.cpp
@@ +66,5 @@
>  
>  void
>  Performance::InsertUserEntry(PerformanceEntry* aEntry)
>  {
> +  nsAutoCString uri;

move it into the next if()

@@ +71,2 @@
>    if (mWorkerPrivate->PerformanceLoggingEnabled()) {
> +    nsresult rv = mWorkerPrivate->GetResolvedScriptURI()->GetHost(uri);

what about if GetResolvedScriptURI returns nullptr?
I would do:

nsAutoCString uri;
nsCOMPtr<nsIURI> scriptURI = mWorkerPrivate->GetResolvedScriptURI();
if (!scriptURI || NS_FAILED(scriptURI->GetHost(uri)) {
  // If we have no URI, just put in "none".
  uri = AssignLiteral("none");
}
...
Attachment #8649786 - Flags: review?(amarchesini) → review+
Target Milestone: --- → FxOS-S5 (21Aug)
Patch updated. :baku, do you mind to review it again? Thank you!
Attachment #8649786 - Attachment is obsolete: true
Attachment #8650370 - Flags: review?(amarchesini)
Attachment #8650370 - Flags: review?(amarchesini) → review+
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/33c6251f05cf
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: FxOS-S5 (21Aug) → FxOS-S6 (04Sep)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: