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

Unified Diff: src/js/arraybuffer.js

Issue 2222893002: Move family of MakeError functions to C++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix in prologue.js Created 4 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
Index: src/js/arraybuffer.js
diff --git a/src/js/arraybuffer.js b/src/js/arraybuffer.js
index 2e7d77e0a37a0acde123cf3d2a40456133421ccf..a1ff03daee4a45679c85763f1a56425a9dd4d15d 100644
--- a/src/js/arraybuffer.js
+++ b/src/js/arraybuffer.js
@@ -12,14 +12,12 @@
// Imports
var GlobalArrayBuffer = global.ArrayBuffer;
-var MakeTypeError;
var MaxSimple;
var MinSimple;
var SpeciesConstructor;
var speciesSymbol = utils.ImportNow("species_symbol");
utils.Import(function(from) {
- MakeTypeError = from.MakeTypeError;
MaxSimple = from.MaxSimple;
MinSimple = from.MinSimple;
SpeciesConstructor = from.SpeciesConstructor;
@@ -30,7 +28,7 @@ utils.Import(function(from) {
// ES6 Draft 15.13.5.5.3
function ArrayBufferSlice(start, end) {
if (!IS_ARRAYBUFFER(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
+ throw %make_type_error(kIncompatibleMethodReceiver,
'ArrayBuffer.prototype.slice', this);
}
@@ -60,17 +58,17 @@ function ArrayBufferSlice(start, end) {
var constructor = SpeciesConstructor(this, GlobalArrayBuffer, true);
var result = new constructor(newLen);
if (!IS_ARRAYBUFFER(result)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
+ throw %make_type_error(kIncompatibleMethodReceiver,
'ArrayBuffer.prototype.slice', result);
}
// 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);
+ throw %make_type_error(kArrayBufferSpeciesThis);
}
if (%_ArrayBufferGetByteLength(result) < newLen) {
- throw MakeTypeError(kArrayBufferTooShort);
+ throw %make_type_error(kArrayBufferTooShort);
}
%ArrayBufferSliceImpl(this, result, first, newLen);
« src/bootstrapper.cc ('K') | « src/js/array-iterator.js ('k') | src/js/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698