Closed Bug 484104 Opened 15 years ago Closed 15 years ago

TM: NEWINIT creates objects with a wrong prototype

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1

People

(Reporter: gal, Assigned: gal)

Details

(Keywords: testcase, verified1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

      No description provided.
Flags: blocking1.9.1?
Thanks to mrbkap for diagnosing this.

Testcase:

var a;
for (var i = 0; i < 10; ++i)
    a = {};
print(uneval(a));

No jit:

({})

Jit:

x.js:4: TypeError: Function.prototype.toString called on incompatible object
Severity: normal → critical
Priority: -- → P1
Assignee: general → gal
Attached patch patchSplinter Review
Attachment #368157 - Flags: review?(mrbkap)
Attachment #368157 - Flags: review?(mrbkap) → review+
http://hg.mozilla.org/tracemonkey/rev/d46fb76b5542
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/d46fb76b5542
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: blocking1.9.1? → blocking1.9.1+
Resolution: --- → FIXED
How'd that old code ever work?!

/be
Verified fixed with testcase given in comment 1 on trunk and 1.9.1 with the
following debug builds:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre)
Gecko/20090422 Minefield/3.6a1pre ID:20090422224452

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre)
Gecko/20090422 Shiretoko/3.5b4pre ID:20090422122043
Status: RESOLVED → VERIFIED
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: mozilla1.9.1b4 → mozilla1.9.2a1
Version: unspecified → Trunk
js1_8_1/trace/trace-test.js	
http://hg.mozilla.org/tracemonkey/rev/61892f57b46a
Flags: in-testsuite+
cvsroot/mozilla/js/tests/js1_8_1/trace/trace-test.js,v  <--  trace-test.js
new revision: 1.14; previous revision: 1.13

/cvsroot/mozilla/js/tests/shell.js,v  <--  shell.js
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: