Closed
Bug 1368669
Opened 8 years ago
Closed 8 years ago
runtime.sendMessage() argument parsing should consider an undefined callback
Categories
(WebExtensions :: General, defect)
Tracking
(firefox-esr52 unaffected, firefox53 unaffected, firefox54 unaffected, firefox55 verified)
VERIFIED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox53 | --- | unaffected |
firefox54 | --- | unaffected |
firefox55 | --- | verified |
People
(Reporter: vtamas, Assigned: zombie)
References
Details
(Keywords: dev-doc-complete, regression)
Attachments
(2 files)
[Affected versions]:
Firefox 55.0a1 (2017-05-29)
[Affected platforms]:
Windows 10 64-bit
Ubuntu 16.04 32-bit
[Steps to reproduce]:
1.Launch Firefox with a clean profile.
2.Install the following add-on: https://addons.mozilla.org/en-US/firefox/addon/screenshot-capture-annotate/
3.Navigate to a new webpage (e.g. https://www.amazon.com/)
4.Click on the webextension icon from toolbar.
5.Select “Capture the entire page” or “Capture selected area”.
[Expected Results]:
The webextension options work without any issue.
[Actual Results]:
- The screenshot is not opened in webextension editing tab.
- The following errors are thrown in Browser Console while selecting the affected capturing options:
SyntaxError: expected expression, got ')' void();:1:5
Error: runtime.sendMessage's extensionId argument is invalid undefined
- See attached screencast.
[Regression Range]:
Last good revision: 952c5438a347b382be5f6ac516365c9a299818bd
First bad revision: 70db5f9c852d04d2d73e879f80385c2c484c2f17
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=952c5438a347b382be5f6ac516365c9a299818bd&tochange=70db5f9c852d04d2d73e879f80385c2c484c2f17
Looks like the following bug has the changes which introduced the regression:
https://bugzilla.mozilla.org/show_bug.cgi?id=1259944
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(aswan)
Comment 1•8 years ago
|
||
Ugh, Awesome Screenshot is calling runtime.sendMessage(object, undefined) with the intention that object is the message and undefined is the callback. But based on [1] we treat those arguments as extensionId, message.
[1] http://searchfox.org/mozilla-central/rev/b318c7dca7392bd16c0b11929f55b1be133f0b31/toolkit/components/extensions/ext-c-runtime.js#57-67
Flags: needinfo?(aswan)
Summary: Two Awesome Screenshot capturing options are broken → runtime.sendMessage() argument parsing should consider an undefined callback
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → tomica
Status: NEW → ASSIGNED
Flags: needinfo?(aswan)
Comment hidden (mozreview-request) |
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8875478 [details]
Bug 1368669 - Support explicit null callback for runtime.sendMessage
https://reviewboard.mozilla.org/r/146916/#review151522
Thanks, I was overthinking this, thinking it would be more complicated but this looks good.
Attachment #8875478 -
Flags: review?(aswan) → review+
Updated•8 years ago
|
Keywords: dev-doc-needed
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Pushed by tomica@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c89f7b976dea
Support explicit null callback for runtime.sendMessage r=aswan
Comment 8•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Reporter | ||
Comment 9•8 years ago
|
||
Confirm that this issue is fixed on Firefox 55.0a1 (2017-06-11) under Windows 10 64-bit and Ubuntu 16.04 32-bit. The webextension options work as expected.
Status: RESOLVED → VERIFIED
Updated•8 years ago
|
status-firefox-esr52:
--- → unaffected
Comment 10•8 years ago
|
||
Updated (again!) -> https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/sendMessage#Parameters
Let me know if this is accurate.
Flags: needinfo?(tomica)
Assignee | ||
Comment 11•8 years ago
|
||
I have reparse this every time, but yeah, it looks good.
Flags: needinfo?(tomica)
Updated•8 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•