Abort on lifecycle event handler errors

RESOLVED FIXED in mozilla38

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: nsm, Assigned: nsm)

Tracking

unspecified
mozilla38
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Abort ServiceWorker installation/activation if event handler errors
Created attachment 8539235 [details] [diff] [review]
Abort on lifecycle event handler errors

Folded:
Handle install event listener errors and fail installation
Activate handler runtime errors should lead to activation failure.
Attachment #8539235 - Flags: review?(amarchesini)
Comment on attachment 8539235 [details] [diff] [review]
Abort on lifecycle event handler errors

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

::: dom/workers/ServiceWorkerManager.cpp
@@ +918,5 @@
>  
>    nsresult rv = target->DispatchDOMEvent(nullptr, event, nullptr, nullptr);
>  
>    nsCOMPtr<nsIGlobalObject> sgo = aWorkerPrivate->GlobalScope();
> +  WidgetEvent* internalEvent = event->GetInternalNSEvent();

can it be null?

@@ +1044,5 @@
>      nsRefPtr<Promise> waitUntilPromise;
>  
>      // FIXME(nsm): Install error handler for any listener errors.
>      nsresult rv = target->DispatchDOMEvent(nullptr, event, nullptr, nullptr);
> +    WidgetEvent* internalEvent = event->GetInternalNSEvent();

null?
Attachment #8539235 - Flags: review?(amarchesini) → review+
From existing uses, it does not seem like this can ever be null.
https://hg.mozilla.org/mozilla-central/rev/5f9d4b439044
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.