Service Worker client.url should use "creation url"

RESOLVED FIXED in Firefox 46

Status

()

defect
RESOLVED FIXED
4 years ago
a month ago

People

(Reporter: catalinb, Assigned: Ehsan)

Tracking

(Blocks 1 bug)

Trunk
mozilla46
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(1 attachment)

Hey Catalin, would you mentor here please? Thanks!
Flags: needinfo?(catalin.badea392)
(Reporter)

Comment 2

4 years ago
I'd wait for the w3c bug to be finished before moving forward with this. It doesn't look like this issue got too much attention lately.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27146
Flags: needinfo?(catalin.badea392)
(Assignee)

Updated

3 years ago
Assignee: nobody → ehsan
Comment on attachment 8705311 [details] [diff] [review]
Return the original document URI from ServiceWorkerClient.url

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

Looks good, thanks!

::: dom/workers/ServiceWorkerClient.cpp
@@ +49,5 @@
> +  nsCOMPtr<nsIURI> originalURI = aDoc->GetOriginalURI();
> +  if (originalURI) {
> +    nsAutoCString spec;
> +    originalURI->GetSpec(spec);
> +    mUrl.Assign(NS_ConvertUTF8toUTF16(spec));

Can you just use CopyUTF8toUTF16() here?

::: testing/web-platform/mozilla/tests/service-workers/service-worker/resources/clients-matchall-client-types-iframe.html
@@ +1,3 @@
>  <!DOCTYPE html>
>  <title>Empty doc</title>
> +<body onload="history.pushState({}, 'title', 'new-url.html')">

Maybe add a comment here to indicate what this is for.  Out of context of this bug I know it would confuse me.
Attachment #8705311 - Flags: review?(bkelly) → review+

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ababff07ea8e
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.