Closed Bug 713671 Opened 12 years ago Closed 12 years ago

addressingWidgetOverlay.js uses non-existent gPromptService

Categories

(SeaMonkey :: MailNews: General, defect)

defect
Not set
normal

Tracking

(seamonkey2.7 fixed, seamonkey2.8 fixed)

RESOLVED FIXED
seamonkey2.9
Tracking Status
seamonkey2.7 --- fixed
seamonkey2.8 --- fixed

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

(Keywords: regression)

Attachments

(2 files)

> +++ This bug was initially created as a clone of Bug #671554 +++

> We import Services.jsm but we need to make better use of prompt provided by
>  it.
> This patch:
> * Switches suite code to use prompt provided by Services.jsm
> * Done some minor code simplification.
IanN missed usage of gPromptService in addressingWidgetOverlay.js:
http://mxr.mozilla.org/comm-central/search?string=gpromptservice&find=%2Fsuite%2Fmailnews%2F&findi=&filter=^[^\0]*%24&hitlimit=&tree=comm-central
Summary: Switch suite/mailnews to use Services.prompt → addressingWidgetOverlay.js uses non-existent gPromptService
> -var test_addresses_sequence = false;
> -
> -try {
> -  if (sPrefs)
> -    test_addresses_sequence = sPrefs.getBoolPref("mail.debug.test_addresses_sequence");
> -}
> -catch (ex) {}
> +var test_addresses_sequence = getPref("mail.debug.test_addresses_sequence");

If getPrefType()returns nsIPrefBranch.PREF_INVALID, getPref() returns null.
And doesn't throw (I think).

> -    gPromptService.alert(window, generalErrString, specificErrString);
> +    Services.prompt.alert(window, generalErrString, specificErrString);

Can't test directly but from code inspection should work. Tested with ExecuteJS:

1. Install ExecuteJS.
2. From the context of the compose window execute:
Services.prompt.alert(window, "General Error", "Specific Error");
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #584451 - Flags: review?(iann_bugzilla)
Requesting approval for comm-aurora and comm-beta because the dependent patch landed in those repositories.
Attachment #584453 - Flags: review?(iann_bugzilla)
Attachment #584453 - Flags: approval-comm-beta?
Attachment #584453 - Flags: approval-comm-aurora?
Attachment #584453 - Flags: review?(iann_bugzilla) → review?(neil)
Attachment #584453 - Flags: review?(neil) → review+
(In reply to Philip Chee from comment #0)
> > +++ This bug was initially created as a clone of Bug #671554 +++
> 
> > We import Services.jsm but we need to make better use of prompt provided by
> >  it.
> > This patch:
> > * Switches suite code to use prompt provided by Services.jsm
> > * Done some minor code simplification.
> IanN missed usage of gPromptService in addressingWidgetOverlay.js:
> http://mxr.mozilla.org/comm-central/
> search?string=gpromptservice&find=%2Fsuite%2Fmailnews%2F&findi=&filter=^[^\0]
> *%24&hitlimit=&tree=comm-central

That also gives another file as using gPromptService, addressbook-panel.js
> That also gives another file as using gPromptService, addressbook-panel.js
Bug 713563 gPromptService is not defined trying to add empty contact from sidebar r=Neil.
Comment on attachment 584451 [details] [diff] [review]
Patch v1.0 Proposed Fix.

I seem to remember a patch elsewhere for the sPrefs stuff in MsgComposeCommands.js
Attachment #584451 - Flags: review?(iann_bugzilla) → review+
Attachment #584453 - Flags: approval-comm-beta?
Attachment #584453 - Flags: approval-comm-beta+
Attachment #584453 - Flags: approval-comm-aurora?
Attachment #584453 - Flags: approval-comm-aurora+
> Attachment #584453 [details] [diff] - Flags: approval-comm-beta? → approval-comm-beta+
> Attachment #584453 [details] [diff] - Flags: approval-comm-aurora? → approval-comm-aurora+
Pushed:
http://hg.mozilla.org/releases/comm-aurora/rev/994869ef8fad
http://hg.mozilla.org/releases/comm-beta/rev/405c38f9cbec
> I seem to remember a patch elsewhere for the sPrefs stuff in MsgComposeCommands.js
sPrefs stub remains until Neil gets around to rewriting the LDAP code.
Pushed to comm-central!
http://hg.mozilla.org/comm-central/rev/9de6fd3a8f73
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.9
Depends on: 765175
You need to log in before you can comment on or make changes to this bug.