INITELEM behavior differs with -j

RESOLVED WORKSFORME

Status

()

defect
RESOLVED WORKSFORME
10 years ago
7 years ago

People

(Reporter: jorendorff, Unassigned)

Tracking

Other Branch
mozilla21
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

function loop() {
    var x;
    for (var i = 0; i < 9; i++)
        x = {1.5: 1};
    return x;
}

loop(); // record
Object.prototype.__defineSetter__('1.5', function () { return 'BAD'; });
var x = loop(); // playback
assertEq(x["1.5"], 1);

//without -j:   test passes.
//with -j:      TypeError: Assertion failed: got (void 0), expected 1
I found this after reading the following code:

  JS_REQUIRES_STACK JSRecordingStatus
  TraceRecorder::record_JSOP_INITELEM()
  {
      return record_JSOP_SETELEM();
  }

which seemed so implausible that I felt compelled to write a few test cases.
However, none of my tests broke in quite the way I expected, so I really
have no idea what causes this bug!
I think that has been fixed.
https://hg.mozilla.org/mozilla-central/rev/de56ae61946d
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.