Closed
Bug 1366702
Opened 8 years ago
Closed 7 years ago
Callback for contextMenus.create is not called when a failure occurs
Categories
(WebExtensions :: Frontend, defect, P3)
Tracking
(firefox63 verified)
| Tracking | Status | |
|---|---|---|
| firefox63 | --- | verified |
People
(Reporter: 61.1p57, Assigned: robwu)
References
(Blocks 1 open bug)
Details
(Whiteboard: triaged)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170518105722
Steps to reproduce:
Run following code on extension console twice:
browser.contextMenus.create({
id: '0',
title: '0',
contexts: ['all']
}, () => {
console.error(browser.runtime.lastError);
});
Actual results:
1st
Returns `0`
Logs `null`
2nd
Returns `0`
Raises "Id already exists" (ext-contextMenus.js:389)
"Error: An unexpected error occurred" (unknown)
Nothing is logged
Expected results:
The callback should also be called when a failure occurs, as the document at [1] states that "It uses an optional callback to communicate success or failure"
[1]: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus/create#Parameters
Updated•8 years ago
|
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
Updated•8 years ago
|
Priority: -- → P3
Whiteboard: triaged
Updated•7 years ago
|
Product: Toolkit → WebExtensions
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → rob
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Comment hidden (mozreview-request) |
Updated•7 years ago
|
Iteration: --- → 63.2 - July 23
Comment 2•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8993766 [details]
Bug 1366702 - Invoke menus.create callback if error occurs + tests
https://reviewboard.mozilla.org/r/258466/#review266410
Attachment #8993766 -
Flags: review?(mixedpuppy) → review+
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/c344f123a5c6
Invoke menus.create callback if error occurs + tests r=mixedpuppy
Comment 4•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
This issue is verified as fixed on Firefox 63.0a1 (20180729220222) under Win 7 64-bit and Mac OS X 10.13.3.
Please see the attached screenshot.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•