Bug 152320
| Summary: | [JSC] TypedArray.prototype.slice() with no argument throws TypeError | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jinyoung Hur <hur.ims> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | Safari 9 | ||
| Hardware: | Unspecified | ||
| OS: | OS X 10.11 | ||
Jinyoung Hur
Below code throws TypeError saying, "Expected at least one argument".
var arr = new Uint8Array([1,2,3]);
arr.slice();
According to below reference, it seems that TypedArray.prototype.slice() should return [1,2,3] because, when omitted, begin is assumed to be zero and end is assumed to be array.length.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Jinyoung Hur
I realized that TypedArray.prototype.slice() is not implemented yet in WebKit.
I'm closing this bug.