two identically-named functions invalidates both

VERIFIED WORKSFORME

Status

()

Core
JavaScript Engine
VERIFIED WORKSFORME
16 years ago
16 years ago

People

(Reporter: Henrik Gemal, Assigned: rogerl (gone))

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
if you have:
<script>
function test() {alert("one")}
function test() {alert("two")}
test();
</script>

IE shows "two"
Mozilla shows no alert!

Isn't this a bug or cant be at least write to the JS Console that something bad
happend!
(Reporter)

Comment 1

16 years ago
Created attachment 96418 [details]
js test case

Comment 2

16 years ago
mozilla 1.1b shows alert "two" only on
Mozilla 1.1b
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722

Comment 3

16 years ago
WFM using build 20020820, Windows 2000.

Comment 4

16 years ago
I see "two" -  WFM, 2002-08-22-05 trunk Linux.

Henrik - are you sure you have "Allow unrequested windows" pref on?

Comment 5

16 years ago
Resolving this as WORKSFORME. Henrik's testcase brings up "two"
for me, also. Using Mozilla trunk binary 20020806xx on WinNT. 

Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME
Summary: two identical named function invalidates both → two identically-named functions invalidates both

Comment 6

16 years ago
Marking Verified -

Henrik, could you confirm that this works OK now? Did you
happen to have the "Allow unrequested windows" pref off? 

Of course, if the problem is still happening for you, please
reopen this bug. But then please let us know what build date
you are using, and we'll try to track this down - thanks.
Status: RESOLVED → VERIFIED

Comment 7

16 years ago
Gee, the testcase still worksforme, even if I have the
"Open unrequested windows" pref unchecked!!! Note there are
other prefs that affect popups, e.g. this onein prefs.js:  

             dom.disable_open_click_delay

See http://www.mozilla.org/releases/mozilla1.0.1/#setprefs
on prefs such as this which have no GUI interface. See bug 126224
for more info on dom.disable_open_click_delay.

To test whether this bug is a Prefs issue, just start Mozilla
and create a new Profile when the Profile Manager comes up.
If it doesn't come up automatically, you can always force it
by launching Mozilla from a console window like this:

        [(path to Mozilla)] ./mozilla -profilemanager 
You need to log in before you can comment on or make changes to this bug.