Add promise support to the sendMessage APIs.

RESOLVED FIXED in Firefox 47

Status

P2
normal
RESOLVED FIXED
3 years ago
3 months ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

unspecified
mozilla47
Bug Flags:
blocking-webextensions ?

Firefox Tracking Flags

(firefox47 fixed)

Details

(Whiteboard: triaged)

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
We should both return promises from the sendMessage functions, and allow the listener functions to return Promise objects, rather than `true`, to send a delayed response.
(Assignee)

Updated

3 years ago
Iteration: --- → 47.3 - Mar 7

Updated

3 years ago
Flags: blocking-webextensions?
Priority: -- → P2
Whiteboard: triaged
(Assignee)

Comment 1

3 years ago
Created attachment 8724322 [details]
MozReview Request: Bug 1248497 – Add promise support to the sendMessage APIs. r?billm

Review commit: https://reviewboard.mozilla.org/r/36979/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/36979/
Attachment #8724322 - Flags: review?(wmccloskey)
Comment on attachment 8724322 [details]
MozReview Request: Bug 1248497 – Add promise support to the sendMessage APIs. r?billm

https://reviewboard.mozilla.org/r/36979/#review33805

::: browser/components/extensions/test/browser/browser_ext_tabs_sendMessage.js:24
(Diff revision 1)
> +              browser.test.fail("Got unexpected resposne callback");

response
Attachment #8724322 - Flags: review?(wmccloskey) → review+
(Assignee)

Comment 3

3 years ago
https://hg.mozilla.org/integration/fx-team/rev/0a65c11157dac3a0940bd834a10bc3ff5702d2f2
Bug 1248497 – Add promise support to the sendMessage APIs. r=billm

Comment 4

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0a65c11157da
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox47: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47

Updated

3 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.