Closed Bug 1236229 Opened 5 years ago Closed 5 years ago

[experiment] The showInfo API in UITour.jsm should accept JavaScript callbacks rather than callback IDs

Categories

(Firefox :: Tours, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 46
Iteration:
46.2 - Jan 11
Tracking Status
firefox46 --- fixed

People

(Reporter: Paolo, Assigned: Paolo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxprivacy])

Attachments

(1 file)

If the showInfo API in UITour.jsm accepts JavaScript callbacks instead of callback IDs, just like it already happens for the button callbacks, then chrome code could easily use them, and there would be no need to pass the message manager to the function anymore, resulting in cleaner code flow.

The close button callback will be used in bug 1231757.
Flags: qe-verify-
Whiteboard: [fxprivacy]
Is this a breaking change to the current API? 

Please note that showInfo is already in use extensively on mozorg, so breaking changes should be avoided unless absolutely necessary. We also need to maintain compatibility for older versions of Firefox.
Just to be clear, I'm only asking in terms of the web content API that mozorg uses here, as opposed to anything internal in Firefox itself.
Comment on attachment 8703344 [details]
MozReview Request: Bug 1236229 - The showInfo API in UITour.jsm should accept JavaScript callbacks rather than callback IDs.

https://reviewboard.mozilla.org/r/29341/#review26121

::: browser/components/uitour/UITour.jsm:1412
(Diff revision 1)
>     * Show an info panel.
>     *
>     * @param {ChromeWindow} aChromeWindow
> -   * @param {nsIMessageSender} aMessageManager
> +   * @param {nsIMessageSender} aMessageManager (This is currently unused.)
>     * @param {Node}     aAnchor

Feel free to remove the argument altogether and update references to this method. I think there's only a few.

IIUC this isn't going to change the usage from web content, only consumers of the JSM.
Attachment #8703344 - Flags: review?(MattN+bmo) → review+
Tryserver build with the argument removed:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=eee393cfb3f3
Summary: The showInfo API in UITour.jsm should accept JavaScript callbacks rather than callback IDs → [experiment] The showInfo API in UITour.jsm should accept JavaScript callbacks rather than callback IDs
https://hg.mozilla.org/mozilla-central/rev/37795691ec97
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
[bugday-20160323]

Status: RESOLVED,FIXED -> UNVERIFIED

Comments:
STR: Not clear.
Developer specific testing

Component: 
Name			Firefox
Version			46.0b9
Build ID		20160322075646
Update Channel          beta
User Agent		Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
OS			Windows 7 SP1 x86_64

Expected Results: 
Developer specific testing

Actual Results: 
As expected
You need to log in before you can comment on or make changes to this bug.