Closed Bug 580931 Opened 14 years ago Closed 14 years ago

JM: "Assertion failure: isBoolean(),"

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: gkw, Assigned: billm)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(1 file, 1 obsolete file)

with({e:[this].map(true.toString)}){} asserts js debug shell on JM changeset 7c6f62fcbd91 without -m or -j at Assertion failure: isBoolean(), at ../jsvalue.h:546
This has to do with our eager this changes.
Attached patch Proposed fix (obsolete) — Splinter Review
The problem here is that "this" is null. Consequently, js_GetPrimitiveThis doesn't ensure that it's an instance of clasp (in this case, a boolean). This causes a later toBoolean call to fail. This patch simply does the clasp test in the null case.
Attachment #462248 - Flags: review?(jorendorff)
Looks good. Note the very reduced testcase: var bts = true.toString; bts(1.234); JSOP_CALLNAME pushes a null |this| value when retrieving the bts identifier.
Attachment #462248 - Flags: review?(jorendorff) → review+
Needs a test, preferably the one in comment 3. r=me with that.
Here's a new patch that includes a test that passes on the patched version and fails on unpatched.
Attachment #462248 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Assignee: general → wmccloskey
A testcase for this bug was automatically identified at js/src/jit-test/tests/jaeger/bug580931-2.js.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: