javascript statement "prompt(string)" fails with the latest nightly of TB or Fx 1.0.1

RESOLVED FIXED

Status

()

--
major
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: intendentedelleacque, Assigned: mscott)

Tracking

(4 keywords)

1.7 Branch
x86
Windows ME
fixed-aviary1.0, fixed-aviary1.0.2, fixed1.7.6, regression
Points:
---
Bug Flags:
blocking1.7.6 +
blocking-aviary1.0.2 +
blocking-aviary1.5 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Virgilio3pc)
Build Identifier: 

I'm writing an extension that uses the javascript function "prompt(string)".
It works perfectly in TB 0.9, but with the latest nightly (20041130) the 
execution fails and in the javascript console I find this error:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 
[nsIDOMJSWINDOW.prompt]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)".
With the nightly it happens every time I call "prompt(string)" in a javascript 
script.
If you want to try, the extension is here: http://nic-nac-
project.de/~kaosmos/profilepass-0.1.xpi


Reproducible: Always
Steps to Reproduce:
1. install an extension that has a javascript script with the 
instruction "prompt(string)"
2. launch thunderbird and try to use the extension
3. in tools --> javascript console you'll find the errore above about "prompt"

Actual Results:  
The javascript fails, because of the error with "prompt(string)"

Expected Results:  
The function "prompt(string)" should show a javascript prompt, as happens with 
the 0.9 version

The bug happens with a new installation, without no additional themes and no 
other extensions.
I see this too, and it happens in the latest nightlies as well.
Status: UNCONFIRMED → NEW
Ever confirmed: true
A workaround is to invoke the prompt service as in the following code snippet:

http://lxr.mozilla.org/mozilla/source/calendar/resources/content/pref/calendarPref.xul#115
(Reporter)

Comment 3

14 years ago
(In reply to comment #2)
> A workaround is to invoke the prompt service as in the following code snippet:
> 
>
http://lxr.mozilla.org/mozilla/source/calendar/resources/content/pref/calendarPref.xul#115
> 

Thank you for the hint, anyway I've just been using that method, but I wanted to
submit the problem because I think that it's a small (?) bug.
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.0.3?
Flags: blocking-aviary1.0.2?
*** Bug 282341 has been marked as a duplicate of this bug. ***
Created attachment 177575 [details] [diff] [review]
Fix. Use the window watcher directly to get an nsIAuthPrompt
Attachment #177575 - Flags: superreview?(dveditz)
Attachment #177575 - Flags: review?(darin)

Updated

14 years ago
Attachment #177575 - Flags: review?(darin) → review+
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.1+
Flags: blocking-aviary1.0.3?
Flags: blocking-aviary1.0.2?
Flags: blocking-aviary1.0.2+
Comment on attachment 177575 [details] [diff] [review]
Fix. Use the window watcher directly to get an nsIAuthPrompt

sr=dveditz,a=dveditz
Attachment #177575 - Flags: superreview?(dveditz)
Attachment #177575 - Flags: superreview+
Attachment #177575 - Flags: approval-aviary1.0.2+
Fixed on the aviary branch.
Keywords: fixed-aviary1.0.2
Doesn't this affect seamonkey 1.7 too?  If so, this needs to land there.
Actually, it changes stuff in gecko so it does need to land there.  Please make
it so.  a=caillon.
Component: General → DOM
Flags: review+
Product: Thunderbird → Core
Version: unspecified → 1.7 Branch
Comment on attachment 177575 [details] [diff] [review]
Fix. Use the window watcher directly to get an nsIAuthPrompt

r=caillon, too.  fwiw.
Attachment #177575 - Flags: review+
Attachment #177575 - Flags: approval1.7.6+
Flags: blocking1.7.6+
Summary: javascript statement "prompt(string)" fails with the latest nightly of TB → javascript statement "prompt(string)" fails with the latest nightly of TB or Fx 1.0.1

Updated

14 years ago
Keywords: fixed1.7.6
Fix landed on the trunk now too. Marking FIXED.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Keywords: regression
(Assignee)

Comment 12

14 years ago
this has been ported to the AVIARY_1_0_20040515_BRANCH. This does not mean that
it's actually fixed in the 1.0 release of course.
Keywords: fixed-aviary1.0
You need to log in before you can comment on or make changes to this bug.