Closed Bug 663351 Opened 15 years ago Closed 15 years ago

TI: Assertion failure: [infer failure] Missing type pushed 0: int, at jsinfer.cpp:289

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

-- var x = []; x.join = function () { return 5; }; assertEq(x.toString(), 5); -- $ ./js -n -a test.js Missing type at #3:00040 pushed 0: int Assertion failure: [infer failure] Missing type pushed 0: int, at jsinfer.cpp:289 Array.prototype.toString basically just calls this.join (or the builtin Object.prototype.toString if join is not callable)
Attached patch Patch — — Splinter Review
Call MarkTypeCallerUnexpected when array_tostring returns a non-string value. toLocaleString and join call array_toString_sub which always returns a string and does not have this problem.
Assignee: general → jandemooij
Status: NEW → ASSIGNED
Attachment #538486 - Flags: review?(bhackett1024)
Comment on attachment 538486 [details] [diff] [review] Patch These bugs need to get killed at their source. Filed bug 663381.
Attachment #538486 - Flags: review?(bhackett1024) → review+
This (and other problems with natives returning things unaccounted for) was fixed by bug 663381.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: