Closed Bug 759820 Opened 13 years ago Closed 13 years ago

Get rid of prompt service fallback in LoginManagerPrompter.js

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 18

People

(Reporter: Margaret, Assigned: capella)

Details

Attachments

(1 file, 2 obsolete files)

We fall back to using the prompt service if we don't have a NativeWindow object, but I can't think of a case where that's necessary. Since this is a lot of extra code, I think we should get rid of it.
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
Attached patch Patch (v1) (obsolete) — Splinter Review
Comment on attachment 654974 [details] [diff] [review] Patch (v1) I'm still learning my way around mobile/android ... but I think this is something close to what's being requested here ... let me know? --mark
Attachment #654974 - Flags: feedback?(margaret.leibovic)
Comment on attachment 654974 [details] [diff] [review] Patch (v1) This looks like it's on the right path. I've been trying to think hard about if our attempt to get NativeWindow will ever fail, and I don't *think* it will, but maybe we should still keep the error checks in place in _getNativeWindow, but upgrade the this.log(...) statements to Cu.reportError(...) so that we'll see them in logcat files if we start getting bug reports of problems here. Also, I noticed that aNativeWindow is passed around a lot, but it's only ever actaul used in one place: http://mxr.mozilla.org/mozilla-central/source/mobile/android/components/LoginManagerPrompter.js#166 Now that we're not going to choose an alternate code path if this._getNativeWindow() returns null, we could just call this._getNativeWindow() in that one spot right before we call nativeWindow.doorhanger.show(...) and remove aNativeWindow as a parameter from that chain of function calls.
Attachment #654974 - Flags: feedback?(margaret.leibovic) → feedback+
Attached patch Patch (v2) (obsolete) — Splinter Review
Double checking my DIFF before asking for review ...
Attachment #654974 - Attachment is obsolete: true
Comment on attachment 657020 [details] [diff] [review] Patch (v2) Looks good, unit testing on my device worked properly ...
Attachment #657020 - Flags: review?(margaret.leibovic)
Attached patch Patch (v3)Splinter Review
Fixed a nit...
Attachment #657020 - Attachment is obsolete: true
Attachment #657020 - Flags: review?(margaret.leibovic)
Attachment #657230 - Flags: review?(margaret.leibovic)
Comment on attachment 657230 [details] [diff] [review] Patch (v3) Nice cleanup.
Attachment #657230 - Flags: review?(margaret.leibovic) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Changes were applied on the latest Nightly: http://mxr.mozilla.org/mozilla-central/source/mobile/android/components/LoginManagerPrompter.js Closing bug as verified fixed.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: