Closed Bug 1286956 Opened 8 years ago Closed 8 years ago

UpdateResultRunnable misuses ErrorResult on multiple threads

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: bzbarsky, Assigned: bkelly)

References

Details

Attachments

(1 file)

See bug 1224664 comment 14.  The mStatus of UpdateResultRunnable is constructed (and has an exception thrown on it) on one thread but then has the exception stuck in a Promise on another thread.  This is not safe.
Flags: needinfo?(bkelly)
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
Flags: needinfo?(bkelly)
I think we actually want DOM exception messages here, so transfer using IPC serialization.  It might be nice to wrap this in an ErrorResult helper in the future.  In theory the ErrorResult could optimize this if its internal value is already thread safe.

Passes tests locally.  Try is down at the moment.
Attachment #8771503 - Flags: review?(bzbarsky)
Comment on attachment 8771503 [details] [diff] [review]
Serialize ErrorResult when transferring between threads. r=bz

r=me.  Thank you!
Attachment #8771503 - Flags: review?(bzbarsky) → review+
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/46e298b95ec1
Serialize ErrorResult when transferring between threads. r=bz
https://hg.mozilla.org/mozilla-central/rev/46e298b95ec1
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: