Issue 26 in google-js-test: ArrayBuffer.prototype.slice is now shipping in browsers, slice.js throws

7 views
Skip to first unread message

google-...@googlecode.com

unread,
Sep 18, 2012, 8:31:26 PM9/18/12
to google-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 26 by benv...@google.com: ArrayBuffer.prototype.slice is now
shipping in browsers, slice.js throws
http://code.google.com/p/google-js-test/issues/detail?id=26

When running a generated HTML page in Chromium I'm hitting an exception in
gjstest/internal/slice.js:
if ('slice' in ArrayBuffer.prototype) {
throw new Error("ArrayBuffer.prototype.slice is already defined.");
}

This is because very recent browsers have unprefixed
ArrayBuffer.prototype.slice, meaning that when running in a browser this
dies. The polyfill in this file should invert its test to only add the
slice method if it doesn't exist, instead of dying when it does.

google-...@googlecode.com

unread,
Sep 18, 2012, 9:13:58 PM9/18/12
to google-...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 26 by jaco...@google.com: ArrayBuffer.prototype.slice
is now shipping in browsers, slice.js throws
http://code.google.com/p/google-js-test/issues/detail?id=26

Argh, how silly of me; sorry for the stupid mistake.

google-...@googlecode.com

unread,
Sep 18, 2012, 9:34:28 PM9/18/12
to google-...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 26 by jaco...@google.com: ArrayBuffer.prototype.slice
is now shipping in browsers, slice.js throws
http://code.google.com/p/google-js-test/issues/detail?id=26

This issue was closed by revision b79b6c6dcf74.

Reply all
Reply to author
Forward
0 new messages