Closed Bug 1136467 Opened 6 years ago Closed 6 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: catalinb, Assigned: catalinb)

References

Details

Attachments

(1 file, 1 obsolete file)

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: 6 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.