Merge V8 5.2.361.47 DO NOT MERGE
https://chromium.googlesource.com/v8/v8/+/5.2.361.47
FPIIM-449
Change-Id: Ibec421b85a9b88cb3a432ada642e469fe7e78346
(cherry picked from commit bcf72ee8e3b26f1d0726869c7ddb3921c68b09a8)
diff --git a/src/js/arraybuffer.js b/src/js/arraybuffer.js
index f0273c7..e739960 100644
--- a/src/js/arraybuffer.js
+++ b/src/js/arraybuffer.js
@@ -70,7 +70,9 @@
throw MakeTypeError(kIncompatibleMethodReceiver,
'ArrayBuffer.prototype.slice', result);
}
- // TODO(littledan): Check for a detached ArrayBuffer
+ // Checks for detached source/target ArrayBuffers are done inside of
+ // %ArrayBufferSliceImpl; the reordering of checks does not violate
+ // the spec because all exceptions thrown are TypeErrors.
if (result === this) {
throw MakeTypeError(kArrayBufferSpeciesThis);
}