Closed Bug 1747348 Opened 5 months ago Closed 4 months ago

compose.sendMessage(tabId) fails when `options` is omitted

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr91+ fixed)

RESOLVED FIXED
97 Branch
Tracking Status
thunderbird_esr91 + fixed

People

(Reporter: siefkenj, Assigned: TbSync)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

In an extension with compose.send permissions, call await browser.compose.sendMessage(tabId) omitting the "optional" options argument.

Actual results:

The call fails with

Error: An unexpected error occurred
    apply self-hosted:2736
    applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:626
    wrapPromise resource://gre/modules/ExtensionCommon.jsm:901

Expected results:

options is indicated as an optional parameter in the documentation here: https://webextension-api.thunderbird.net/en/91/compose.html
Calling browser.compose.sendMessage(tabId) should be the same as browser.compose.sendMessage(tabId, {mode: "default"}).

Assignee: nobody → john
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 97 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/0ef7910e76e2
Fix compose.sendMessage() failing, if options are not provided. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED

Comment on attachment 9256687 [details]
Bug 1747348 - Fix compose.sendMessage() failing, if options are not provided. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
API does not behave as described in the documentation

Testing completed (on c-c, etc.):
Landed 14 days ago on daily/beta

Risk to taking this patch (and alternatives if risky):
I do not see any, but it could cause test failures, if I missed something. The actual code change is minimal.

Attachment #9256687 - Flags: approval-comm-esr91?

Comment on attachment 9256687 [details]
Bug 1747348 - Fix compose.sendMessage() failing, if options are not provided. r=mkmelin

[Triage Comment]
Approved for esr91

Attachment #9256687 - Flags: approval-comm-esr91? → approval-comm-esr91+
You need to log in before you can comment on or make changes to this bug.