Closed Bug 1587496 Opened 4 years ago Closed 4 years ago

Update nsIBrowserHandler users in browser.js to use new BrowserHandler lazy getter

Categories

(Firefox :: General, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: mkaply, Assigned: jacksonsd)

Details

(Keywords: good-first-bug)

Attachments

(2 files, 2 obsolete files)

In bug 158968, a getter was added to use nsIBrowserHandler as BrowserHandler.

We should update the two places that still get the service to use the getter:

https://searchfox.org/mozilla-central/search?q=Ci.nsIBrowserHandler&case=false&regexp=false&path=browser.js

This seems pretty simple. Can i have this bug?

Sure. I'll assign it to you once a patch is up.

This page should help.

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction

Our team updated the two places that still get the service to use the getter. Here is our patch for review. And here is a link to the updated file on our GitHub
https://github.com/CSCI-462-02-2020/Sleep-Deprived/blob/master/browser.js

Flags: needinfo?(mozilla)

Hey squidney, after talking with someone on the Mozilla chat, I think the fix is actually simpler than that.

This change should work. I've simply changed the first place to:
let defaultArgs = BrowserHandler.defaultArgs;

and the second place to:
var handler = BrowserHandler;

The patch is attached.

/Users/jasonadler/Desktop/browser.js

https://github.com/adlerjasonc/firefox/blob/master/browser.js

Thanks for this. If you look at the top of the file,

https://github.com/adlerjasonc/firefox/blob/master/browser.js#L253

there's a place to globally define the lazy service getter.

Then you would use that getter to access the appropriate parameters of the browser handler.

Flags: needinfo?(mozilla)

Also, please take a look at using phabricator to submit patches:

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch

Assignee: nobody → jacksonsd
Status: NEW → ASSIGNED
Attachment #9132910 - Attachment is obsolete: true
Attachment #9133655 - Attachment description: Change Bug 1587496 - 1587496: Updated nsIBroswerHandler to Bug 1587496 - Updated nsIBrowserHandler r=mkaply → Bug 1587496 - Update nsIBrowserHandler users in browser.js to use new BrowserHandler lazy getter. r=mkaply
Attachment #9128945 - Attachment is obsolete: true
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/2fcfa5bc49e5
Update nsIBrowserHandler users in browser.js to use new BrowserHandler lazy getter. r=mkaply
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
You need to log in before you can comment on or make changes to this bug.