Closed
Bug 1214040
Opened 9 years ago
Closed 9 years ago
tabs.sendMessage should not raise an exception on unexistent tabId
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: rpl, Assigned: rpl)
References
Details
(Whiteboard: [tabs])
Attachments
(1 file, 1 obsolete file)
3.38 KB,
patch
|
rpl
:
review+
|
Details | Diff | Splinter Review |
browser.tabs.sendMessage currently raises an exception when the passed tabId doesn't exists in the tab manager because it tries to use an "undefined" tab. I was going to raise an Error with a more descriptive message but I noticed that on Chrome it doesn't currently raise any error, it simply becames a no-op.
Assignee | ||
Comment 1•9 years ago
|
||
The attached patch contains a small change (tabs.sendMessage turned into a no-op if there is no tab with the defined tabId) and a related testcase.
Attachment #8672863 -
Flags: review?(wmccloskey)
Updated•9 years ago
|
Whiteboard: [tabs]
Attachment #8672863 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → luca.greco
Assignee | ||
Comment 2•9 years ago
|
||
I've checked that this patch applies cleanly on a recent mozilla-central and I've updated the commit message.
Attachment #8672863 -
Attachment is obsolete: true
Hi Luca, is this ready for checkin? Also, you can set the r+ flag on your own patch if I've reviewed a previous version and it hasn't changed significantly.
Flags: needinfo?(luca.greco)
Assignee | ||
Comment 4•9 years ago
|
||
yes, it is I was waiting for the "try build" to be completed: https://treeherder.mozilla.org/#/jobs?repo=try&revision=63ac198f56f8 and the failures are unrelated to this change. I'm going to add the r+ and the checkin-needed.
Flags: needinfo?(luca.greco)
Assignee | ||
Updated•9 years ago
|
Attachment #8674816 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 6•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bf9a0354bc7c
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•9 years ago
|
Flags: blocking-webextensions+
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•