[Webkit-unassigned] [Bug 122976] New: ArrayBuffer is not a Function, does not support bind(), apply(), etc.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 17 11:07:47 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=122976
Summary: ArrayBuffer is not a Function, does not support
bind(), apply(), etc.
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.8
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: justinfagnani at google.com
ArrayBuffer is an ArrayBufferConstructor, which is a callable object, not a Function, and therefore is missing bind(), call(), apply(), etc.
Some techniques for calling arbitrary constructors with arbitrary argument lists involve calling bind() and apply(), like so:
function applyToConstructor(constructor, argArray) {
var args = [null].concat(argArray);
var factoryFunction = constructor.bind.apply(constructor, args);
return new factoryFunction();
}
Passing ArrayBuffer as the constructor fails in Safari.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list