Closed Bug 1008338 Opened 10 years ago Closed 10 years ago

Add WorkerScriptExecutedSuccessfully()

Categories

(Core :: DOM: Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: nsm, Assigned: nsm)

Details

Attachments

(1 file, 1 obsolete file)

This is required for ServiceWorkers Update() algorithm, where on "parse errors or uncaught errors" we need to reject Promises instead of bubbling the error up the tree.
Assignee: nobody → nsm.nikhil
Comment on attachment 8420265 [details] [diff] [review]
Add WorkerScriptExecutedSuccessfully().

Bad MQ
Attachment #8420265 - Attachment is obsolete: true
Attachment #8420265 - Flags: review?(bent.mozilla)
Comment on attachment 8420302 [details] [diff] [review]
Add WorkerScriptExecutedSuccessfully().

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

r=me with these fixed:

::: dom/workers/WorkerPrivate.h
@@ +1069,5 @@
>    { }
>  #endif
>  
> +  void
> +  SetWorkerScriptExecutedSuccessfully(bool aValue)

I don't think that this should take a value since you should never need to call it more than once, it starts off as false, and you only need to set it to true.

Also, this needs a AssertIsOnWorkerThread and an assertion to never let it be called more than once.

@@ +1075,5 @@
> +    mWorkerScriptExecutedSuccessfully = aValue;
> +  }
> +
> +  bool
> +  WorkerScriptExecutedSuccessfully()

Nit: make this a const method.
Attachment #8420302 - Flags: review?(bent.mozilla) → review+
Comment on attachment 8420302 [details] [diff] [review]
Add WorkerScriptExecutedSuccessfully().

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

::: dom/workers/WorkerPrivate.h
@@ +1075,5 @@
> +    mWorkerScriptExecutedSuccessfully = aValue;
> +  }
> +
> +  bool
> +  WorkerScriptExecutedSuccessfully()

This needs the AssertIsOnWorkerThread call too.
https://hg.mozilla.org/mozilla-central/rev/388f59954ef6
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: