Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 02a700574578e08a0deca80bdbddc6ea544be78e..30e3b822dff8e8560485d05bca2abeb590956963 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -5622,6 +5622,15 @@ BUILTIN(ArrayBufferConstructor_ConstructStub) { |
return *result; |
} |
+// ES6 section 24.1.4.1 get ArrayBuffer.prototype.byteLength |
+BUILTIN(ArrayBufferPrototypeGetByteLength) { |
+ HandleScope scope(isolate); |
+ CHECK_RECEIVER(JSArrayBuffer, array_buffer, |
+ "get ArrayBuffer.prototype.byteLength"); |
+ // TODO(franzih): According to the ES6 spec, we should throw a TypeError |
+ // here if the JSArrayBuffer is detached. |
+ return array_buffer->byte_length(); |
+} |
// ES6 section 24.1.3.1 ArrayBuffer.isView ( arg ) |
BUILTIN(ArrayBufferIsView) { |