Problem of prototype chain when 2 instance is created

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
9 years ago
9 years ago

People

(Reporter: zaku7890, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Opera/9.80 (Windows NT 5.1; U; ja) Presto/2.2.15 Version/10.10
Build Identifier: Ver.3.5.6

Problem of prototype chain when 2 instance is created. (Ver.3.5.6 - OS:WindowsXP)

<html><head><script type="text/javascript">
var Foo = function(){};
Foo.prototype.hello = function(){ alert("0") };

var Bar = function(){};
Bar.prototype = new Foo();

var a = new Bar();
var b = new Bar();

a.hello(); // 0 is displayed. ---------
b.hello(); // 0 is displayed. ---------

Bar.prototype.hello = function(){ alert("1") };

a.hello(); // 1 is displayed. ---------
b.hello(); // 0 is displayed. --------- If it is normal, 1 is displayed. (IE, Chrome, and Opera is OK)
</script></head></html>

Reproducible: Always
This seems fixed in the latest 3.6 nightly build. Can you retest?
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-1.9.2/
(Reporter)

Comment 3

9 years ago
I was not confirming it in Ver.3.6. 
It tries now.
(Reporter)

Comment 4

9 years ago
OK. I tested.
No problem in Ver 3.6b6pre. (windowsXP)
Thanks, then the problem won't be present anymore in the next milestone release.
Resolving WFM.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.