Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: src/arraybuffer.js

Issue 21924007: Make new Harmony constructors subclassing-friendly (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/collection.js » ('j') | src/collection.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arraybuffer.js
diff --git a/src/arraybuffer.js b/src/arraybuffer.js
index 4a4f570146568464dfe8938502e9a827be60c6cd..b3229a54654773efbf3d25ae14c90358ee954f11 100644
--- a/src/arraybuffer.js
+++ b/src/arraybuffer.js
@@ -32,12 +32,8 @@ var $ArrayBuffer = global.ArrayBuffer;
// -------------------------------------------------------------------
function ArrayBufferConstructor(length) { // length = 1
- if (%_IsConstructCall()) {
- var byteLength = ToPositiveInteger(length, 'invalid_array_buffer_length');
- %ArrayBufferInitialize(this, byteLength);
- } else {
- throw MakeTypeError('constructor_not_function', ["ArrayBuffer"]);
- }
+ var byteLength = ToPositiveInteger(length, 'invalid_array_buffer_length');
+ %ArrayBufferInitialize(this, byteLength);
}
function ArrayBufferGetByteLength() {
« no previous file with comments | « no previous file | src/collection.js » ('j') | src/collection.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698