Closed
Bug 1222097
Opened 9 years ago
Closed 9 years ago
openWindow: path resolution works differently in Firefox vs Chrome
Categories
(Core :: DOM: Push Subscriptions, defect)
Core
DOM: Push Subscriptions
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: marco, Assigned: marco)
References
Details
Attachments
(2 files, 1 obsolete file)
1.77 KB,
patch
|
bkelly
:
review+
ritu
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
1.91 KB,
patch
|
marco
:
review+
|
Details | Diff | Splinter Review |
For example: https://localhost:3003/push-clients/service-worker.js clients.openWindow('./push-clients/index.html'); in Firefox opens https://localhost:3003/push-clients/index.html in Chrome opens https://localhost:3003/push-clients/push-clients/index.html
Assignee | ||
Comment 1•9 years ago
|
||
To reproduce: - clone https://github.com/marco-c/serviceworker-cookbook/tree/push_notification_clients - run 'npm install' - run 'gulp start-server' - open 'http://localhost:3003/push-clients/index.html'
Comment 2•9 years ago
|
||
Yes, this is a bug in FF. The spec says: "Let url be the result of parsing url with entry settings object's API base URL." Here the entry settings object is for the ServiceWorker thread, so it should be the scriptURL. But our code just uses the origin: https://dxr.mozilla.org/mozilla-central/rev/cc48981c026c50fdf80d47b040ae1fb8fe99ad07/dom/workers/ServiceWorkerClients.cpp#427 I think we just need to change info.mOrigin to info.mHref on that line.
Assignee | ||
Comment 3•9 years ago
|
||
Seems simple, I'll take a stab at it.
Assignee: nobody → mar.castelluccio
Status: NEW → ASSIGNED
Comment 4•9 years ago
|
||
(In reply to Marco Castelluccio [:marco] from comment #3) > Seems simple, I'll take a stab at it. Thanks! It would be great to have a wpt test for it as well. :-)
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8684288 -
Flags: review?(bkelly)
Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8684289 -
Flags: review?(bkelly)
Updated•9 years ago
|
Attachment #8684288 -
Flags: review?(bkelly) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8684289 [details] [diff] [review] Test Review of attachment 8684289 [details] [diff] [review]: ----------------------------------------------------------------- Looks good! You verified this fails without the P1 patch?
Attachment #8684289 -
Flags: review?(bkelly) → review+
Assignee | ||
Comment 8•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9bcd97ead0f5
Assignee | ||
Comment 9•9 years ago
|
||
> Looks good! You verified this fails without the P1 patch? Yes, it opens http://mochi.test:8888/open_window/client.html instead of http://mochi.test:8888/tests/dom/workers/test/serviceworkers/open_window/client.html.
Assignee | ||
Comment 10•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=24f79172bd7a
Assignee | ||
Comment 11•9 years ago
|
||
I've had to update the expected number of opened windows. Carrying r+ since it's a straightforward change.
Attachment #8684289 -
Attachment is obsolete: true
Attachment #8684382 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 12•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7ebf32f639a9 https://hg.mozilla.org/integration/mozilla-inbound/rev/87f8165c1152
Keywords: checkin-needed
Updated•9 years ago
|
status-firefox44:
--- → affected
Comment 13•9 years ago
|
||
Comment on attachment 8684288 [details] [diff] [review] Patch Requesting uplift since this fix is important for push notifications which I believe we want to ship in 44. This request is for both patches. Approval Request Comment [Feature/regressing bug #]: ServiceWorkers and push notifications [User impact if declined]: Sites using openWindow() from push notifications with a relative path may not work. [Describe test coverage new/current, TreeHerder]: Includes mochitests [Risks and why]: Minimal. Only affects service worker based openWindow(). [String/UUID change made/needed]: None
Attachment #8684288 -
Flags: approval-mozilla-aurora?
Comment 14•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7ebf32f639a9 https://hg.mozilla.org/mozilla-central/rev/87f8165c1152
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment on attachment 8684288 [details] [diff] [review] Patch Seems safe enough. Let's uplift to Aurora44.
Attachment #8684288 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Marco, will you be landing the mochitest on Aurora as well? I think that would be very helpful to catch regressions.
Flags: needinfo?(mar.castelluccio)
Comment 17•9 years ago
|
||
I actually requested the uplift here, not Marco. Yes, please uplift both patches.
Flags: needinfo?(mar.castelluccio)
Comment 18•9 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-aurora/rev/86a326cd5146 https://hg.mozilla.org/releases/mozilla-aurora/rev/b83e637429b0
Comment 19•9 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/86a326cd5146 https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/b83e637429b0
status-b2g-v2.5:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•