ServiceWorker: client.postMessage should be dispatched to navigator.serviceWorker.onmessage

RESOLVED FIXED in Firefox 39

Status

()

defect
RESOLVED FIXED
5 years ago
4 months ago

People

(Reporter: catalinb, Assigned: catalinb)

Tracking

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

Firefox Tracking Flags

(firefox39 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment on attachment 8568871 [details] [diff] [review]
ServiceWorker: client.postMessage should land in navigator.serviceWorker.onmessage.

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

Baku for webidl signoff.

r=me
Attachment #8568871 - Flags: review?(nsm.nikhil) → review?(amarchesini)
Comment on attachment 8568871 [details] [diff] [review]
ServiceWorker: client.postMessage should land in navigator.serviceWorker.onmessage.

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

::: dom/workers/ServiceWorkerClient.cpp
@@ +86,5 @@
>  
> +    ErrorResult result;
> +    dom::Navigator* navigator = window->GetNavigator(result);
> +    if (NS_WARN_IF(result.Failed())) {
> +      return NS_ERROR_FAILURE;

return result.ErrorCode();

@@ +91,5 @@
> +    }
> +
> +    nsRefPtr<ServiceWorkerContainer> container = navigator->ServiceWorker();
> +    if (result.Failed()) {
> +      NS_WARNING("Failed to dispatch controllerchange event");

really? I don't think we need this if(). the result has been already checked.
Attachment #8568871 - Flags: review?(amarchesini) → review+
Comment on attachment 8569330 [details] [diff] [review]
ServiceWorker: client.postMessage should land in navigator.serviceWorker.onmessage.

https://hg.mozilla.org/integration/mozilla-inbound/rev/720b1b0c423d
Attachment #8569330 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/720b1b0c423d
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.