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

Unified Diff: src/builtins/builtins-typedarray.cc

Issue 2693043009: [typedarrays] sort in C++ for undefined comparefn (Closed)
Patch Set: [typedarrays] sort in C++ for no comparison function Created 3 years, 10 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/js/typedarray.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-typedarray.cc
diff --git a/src/builtins/builtins-typedarray.cc b/src/builtins/builtins-typedarray.cc
index 4c80efb7cf33a9171bad2f3df0c89b7871b75096..2adbc0ba63dd0834de632aac26619c41f441e1cd 100644
--- a/src/builtins/builtins-typedarray.cc
+++ b/src/builtins/builtins-typedarray.cc
@@ -169,18 +169,6 @@ void Builtins::Generate_TypedArrayPrototypeKeys(
namespace {
-MaybeHandle<JSTypedArray> ValidateTypedArray(Isolate* isolate,
- Handle<Object> receiver,
- const char* method_name) {
- if (V8_UNLIKELY(!receiver->IsJSTypedArray())) {
- const MessageTemplate::Template message = MessageTemplate::kNotTypedArray;
- THROW_NEW_ERROR(isolate, NewTypeError(message), JSTypedArray);
- }
-
- // TODO(caitp): throw if array.[[ViewedArrayBuffer]] is neutered (per v8:4648)
- return Handle<JSTypedArray>::cast(receiver);
-}
-
int64_t CapRelativeIndex(Handle<Object> num, int64_t minimum, int64_t maximum) {
int64_t relative;
if (V8_LIKELY(num->IsSmi())) {
@@ -207,7 +195,7 @@ BUILTIN(TypedArrayPrototypeCopyWithin) {
Handle<JSTypedArray> array;
const char* method = "%TypedArray%.prototype.copyWithin";
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, array, ValidateTypedArray(isolate, args.receiver(), method));
+ isolate, array, JSTypedArray::Validate(isolate, args.receiver(), method));
if (V8_UNLIKELY(array->WasNeutered())) return *array;
« no previous file with comments | « no previous file | src/js/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698