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

Unified Diff: src/js/harmony-atomics.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/harmony-atomics.js
diff --git a/src/js/harmony-atomics.js b/src/js/harmony-atomics.js
index 5af55c210995acf5cd7f5aa5d1fff34ecd47abac..bfbf0c505e54bab3ff298f370de8d54c903114af 100644
--- a/src/js/harmony-atomics.js
+++ b/src/js/harmony-atomics.js
@@ -12,14 +12,10 @@
// Imports
var GlobalObject = global.Object;
-var MakeRangeError;
-var MakeTypeError;
var MaxSimple;
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
- MakeTypeError = from.MakeTypeError;
- MakeRangeError = from.MakeRangeError;
MaxSimple = from.MaxSimple;
});
@@ -28,14 +24,14 @@ utils.Import(function(from) {
function CheckSharedIntegerTypedArray(ia) {
if (!%IsSharedIntegerTypedArray(ia)) {
- throw MakeTypeError(kNotIntegerSharedTypedArray, ia);
+ throw %make_type_error(kNotIntegerSharedTypedArray, ia);
}
}
function CheckSharedInteger32TypedArray(ia) {
CheckSharedIntegerTypedArray(ia);
if (!%IsSharedInteger32TypedArray(ia)) {
- throw MakeTypeError(kNotInt32SharedTypedArray, ia);
+ throw %make_type_error(kNotInt32SharedTypedArray, ia);
}
}
@@ -44,10 +40,10 @@ function ValidateIndex(index, length) {
var numberIndex = TO_NUMBER(index);
var accessIndex = TO_INTEGER(numberIndex);
if (numberIndex !== accessIndex) {
- throw MakeRangeError(kInvalidAtomicAccessIndex);
+ throw %make_range_error(kInvalidAtomicAccessIndex);
}
if (accessIndex < 0 || accessIndex >= length) {
- throw MakeRangeError(kInvalidAtomicAccessIndex);
+ throw %make_range_error(kInvalidAtomicAccessIndex);
}
return accessIndex;
}
« src/bootstrapper.cc ('K') | « src/js/collection-iterator.js ('k') | src/js/harmony-simd.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698