addressingWidgetOverlay.js uses non-existent gPromptService

RESOLVED FIXED in seamonkey2.9

Status

SeaMonkey
MailNews: General
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Philip Chee, Assigned: Philip Chee)

Tracking

({regression})

Trunk
seamonkey2.9
regression
Dependency tree / graph

SeaMonkey Tracking Flags

(seamonkey2.7 fixed, seamonkey2.8 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

6 years ago
> +++ 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
(Assignee)

Updated

6 years ago
Summary: Switch suite/mailnews to use Services.prompt → addressingWidgetOverlay.js uses non-existent gPromptService
(Assignee)

Comment 1

6 years ago
Created attachment 584451 [details] [diff] [review]
Patch v1.0 Proposed Fix.

> -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)
(Assignee)

Comment 2

6 years ago
Created attachment 584453 [details] [diff] [review]
Patch Bv1.0 Minimal Branch Patch.

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?
(Assignee)

Updated

6 years ago
Attachment #584453 - Flags: review?(iann_bugzilla) → review?(neil)

Updated

6 years ago
Attachment #584453 - Flags: review?(neil) → review+

Comment 3

6 years ago
(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
(Assignee)

Comment 4

6 years ago
> 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 5

6 years ago
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+

Updated

6 years ago
Attachment #584453 - Flags: approval-comm-beta?
Attachment #584453 - Flags: approval-comm-beta+
Attachment #584453 - Flags: approval-comm-aurora?
Attachment #584453 - Flags: approval-comm-aurora+
(Assignee)

Comment 6

6 years ago
> 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
(Assignee)

Updated

6 years ago
status-seamonkey2.7: --- → fixed
status-seamonkey2.8: --- → fixed
(Assignee)

Comment 7

6 years ago
> 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.
(Assignee)

Comment 8

6 years ago
Pushed to comm-central!
http://hg.mozilla.org/comm-central/rev/9de6fd3a8f73
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.9
(Assignee)

Updated

6 years ago
Duplicate of this bug: 734549
(Assignee)

Updated

5 years ago
Depends on: 765175
You need to log in before you can comment on or make changes to this bug.