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

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

Issue 2778623003: [typedarrays] Check detached buffer at start of typed array methods (Closed)
Patch Set: Created 3 years, 9 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') | src/js/typedarray.js » ('J')
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 030289ca85db2044dc768bfad055bdb2989192d7..3954e509b370ed6af1e742fd2b6bdf07f0ae9766 100644
--- a/src/builtins/builtins-typedarray.cc
+++ b/src/builtins/builtins-typedarray.cc
@@ -47,12 +47,10 @@ BUILTIN(TypedArrayPrototypeCopyWithin) {
HandleScope scope(isolate);
Handle<JSTypedArray> array;
- const char* method = "%TypedArray%.prototype.copyWithin";
adamk 2017/03/27 19:48:20 Why did this change? "%TypedArray%" is the spec na
Choongwoo Han 2017/03/28 09:50:58 Done.
+ const char* method = "TypedArray.prototype.copyWithin";
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, array, JSTypedArray::Validate(isolate, args.receiver(), method));
- if (V8_UNLIKELY(array->WasNeutered())) return *array;
-
int64_t len = array->length_value();
int64_t to = 0;
int64_t from = 0;
@@ -112,12 +110,10 @@ BUILTIN(TypedArrayPrototypeFill) {
HandleScope scope(isolate);
Handle<JSTypedArray> array;
- const char* method = "%TypedArray%.prototype.fill";
+ const char* method = "TypedArray.prototype.fill";
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, array, JSTypedArray::Validate(isolate, args.receiver(), method));
- if (V8_UNLIKELY(array->WasNeutered())) return *array;
-
int64_t len = array->length_value();
int64_t start = 0;
int64_t end = len;
@@ -161,7 +157,7 @@ BUILTIN(TypedArrayPrototypeIncludes) {
HandleScope scope(isolate);
Handle<JSTypedArray> array;
- const char* method = "%TypedArray%.prototype.includes";
+ const char* method = "TypedArray.prototype.includes";
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, array, JSTypedArray::Validate(isolate, args.receiver(), method));
@@ -194,7 +190,7 @@ BUILTIN(TypedArrayPrototypeIndexOf) {
HandleScope scope(isolate);
Handle<JSTypedArray> array;
- const char* method = "%TypedArray%.prototype.indexOf";
+ const char* method = "TypedArray.prototype.indexOf";
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, array, JSTypedArray::Validate(isolate, args.receiver(), method));
@@ -225,7 +221,7 @@ BUILTIN(TypedArrayPrototypeLastIndexOf) {
HandleScope scope(isolate);
Handle<JSTypedArray> array;
- const char* method = "%TypedArray%.prototype.lastIndexOf";
+ const char* method = "TypedArray.prototype.lastIndexOf";
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, array, JSTypedArray::Validate(isolate, args.receiver(), method));
@@ -259,12 +255,10 @@ BUILTIN(TypedArrayPrototypeReverse) {
HandleScope scope(isolate);
Handle<JSTypedArray> array;
- const char* method = "%TypedArray%.prototype.reverse";
+ const char* method = "TypedArray.prototype.reverse";
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, array, JSTypedArray::Validate(isolate, args.receiver(), method));
- if (V8_UNLIKELY(array->WasNeutered())) return *array;
-
ElementsAccessor* elements = array->GetElementsAccessor();
elements->Reverse(*array);
return *array;
« no previous file with comments | « no previous file | src/js/typedarray.js » ('j') | src/js/typedarray.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698