Open
Bug 1198634
Opened 9 years ago
Updated 2 years ago
Wrong argument index for DecompileArg
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox43 | --- | affected |
People
(Reporter: anba, Unassigned)
Details
Test case: --- Number.prototype.from = Int8Array.from; 0..from([], 1) --- Expected: Throws TypeError with message "0 is not a constructor" Actual: Throws TypeError with message "1 is not a constructor" http://hg.mozilla.org/mozilla-central/file/f61c3cc0eb8b/js/src/builtin/TypedArray.js#l1009 > ThrowTypeError(JSMSG_NOT_CONSTRUCTOR, DecompileArg(1, C)); There is also: http://hg.mozilla.org/mozilla-central/file/f61c3cc0eb8b/js/src/builtin/TypedObject.js#l947 > ThrowTypeError(JSMSG_NOT_FUNCTION, DecompileArg(0, maybeFunc)); This could be changed to "DecompileArg(2, maybeFunc)", or probably just "assert(IsCallable(maybeFunc))", because both callers to MapUntypedSeqImpl already check IsCallable.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•