ProfileManager does not delete profiles

VERIFIED FIXED in fennec1.0

Status

VERIFIED FIXED
9 years ago
8 years ago

People

(Reporter: armenzg, Assigned: fabrice.desre)

Tracking

Fennec 1.1
fennec1.0
ARM
Maemo

Details

Attachments

(1 attachment, 1 obsolete attachment)

11.75 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
(Reporter)

Description

9 years ago
Mozilla/5.0 (X11; U; Linux armv6l; de; (even though it is a multi-locale build) rv:1.9.2b2pre) Gecko/20091104 Firefox/3.6b2pre Fennec/1.0b5

1) fennec --ProfileManager
2) Create profile(s)
3) Try to delete it them
The profile manager is trying to display a prompt, confirming you wish to delete the profile, but it fails.

It's actually a problem with our nsPromptService. Our service uses code in the browser.xul file to work. But when the profilemanager window is open, browser.xul has not opened, so we get errors.

We should probably pass through the the toolkit method (or service) to show prompts when Fennec itself is not running.
(Assignee)

Comment 2

9 years ago
Created attachment 410454 [details] [diff] [review]
fix

This patch :
- uses the overridden component when the main window is not yet opened.

- fixes a bug in select.xul introduced when adding support for VK_ESCAPE and VK_RETURN
Assignee: nobody → fabrice.desre
Attachment #410454 - Flags: review?(mark.finkle)
Comment on attachment 410454 [details] [diff] [review]
fix


>-  openDialog: function(parent, src, params) {
>+  openDialog: function(aParent, src, params) {

Update the other two arguments too

>   alert: function(aParent, aTitle, aText) {
>+    let doc = this.getDocument();
>+    if (!doc) {
>+      let ps = Components.classesByID["{a2112d6a-0e28-421f-b46a-25c0B308cbd0}"].
>+                            getService(Ci.nsIPromptService); 
>+      ps.alert(aParent, aTitle, aText);
>+    }

Add a helper function to get the standard prompt service (_getFallback or something)

>   confirmEx: function(aParent, aTitle, aText, aButtonFlags, aButton0,
>             aButton1, aButton2, aCheckMsg, aCheckState) {
>     let numButtons = 0;
>     let titles = [aButton0, aButton1, aButton2];
>-    

Some whitespace is good!

>   commonPrompt : function(aParent, aTitle, aText, aValue, aCheckMsg, aCheckState, isPassword) {
>     var params = new Object();
>     params.result = false;
>     params.checkbox = aCheckState;
>     params.value = aValue;
>+    let doc = this.getDocument();
>+    if (!doc) {
>+      throw "No document !";
>+    }

Could move this above the param code block. Make sure you have a blank line after it :)
Attachment #410454 - Flags: review?(mark.finkle) → review-
(Assignee)

Comment 4

9 years ago
Created attachment 411989 [details] [diff] [review]
updated fix

Addressed comment #3
Attachment #410454 - Attachment is obsolete: true
Attachment #411989 - Flags: review?(mark.finkle)
Attachment #411989 - Flags: review?(mark.finkle) → review+
I can delete profiles again!

pushed:
https://hg.mozilla.org/mobile-browser/rev/d530b0a18392
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Updated

9 years ago
Duplicate of this bug: 520260

Comment 7

9 years ago
Verified fixed (deleting and renaming) with the todays nightly builds for Linux x86 on Debian GNU/Linux.
Status: RESOLVED → VERIFIED
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Post-B5

Updated

8 years ago
Component: Linux/Maemo → General
OS: All → Linux (embedded)
QA Contact: maemo-linux → general
Hardware: All → ARM
You need to log in before you can comment on or make changes to this bug.