Index: src/js/typedarray.js |
diff --git a/src/js/typedarray.js b/src/js/typedarray.js |
index 0f335d37b58abb575696875a08bc1b62913011ff..18f6dde29975de4ba34b824b5c9f57fa84061efe 100644 |
--- a/src/js/typedarray.js |
+++ b/src/js/typedarray.js |
@@ -68,8 +68,6 @@ endmacro |
TYPED_ARRAYS(DECLARE_GLOBALS) |
-var TypedArray = %object_get_prototype_of(GlobalUint8Array); |
- |
utils.Import(function(from) { |
ArrayValues = from.ArrayValues; |
GetIterator = from.GetIterator; |
@@ -810,7 +808,7 @@ function TypedArrayFrom(source, mapfn, thisArg) { |
} |
%FunctionSetLength(TypedArrayFrom, 1); |
-function TypedArrayConstructor() { |
+function TypedArray() { |
if (IS_UNDEFINED(new.target)) { |
throw MakeTypeError(kConstructorNonCallable, "TypedArray"); |
} |
@@ -821,10 +819,9 @@ function TypedArrayConstructor() { |
// ------------------------------------------------------------------- |
-%SetCode(TypedArray, TypedArrayConstructor); |
+%FunctionSetPrototype(TypedArray, new GlobalObject()); |
%AddNamedProperty(TypedArray.prototype, |
"constructor", TypedArray, DONT_ENUM); |
- |
utils.InstallFunctions(TypedArray, DONT_ENUM, [ |
"from", TypedArrayFrom, |
"of", TypedArrayOf |