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

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

Issue 2778623003: [typedarrays] Check detached buffer at start of typed array methods (Closed)
Patch Set: pass test262 for subarray 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 | « src/runtime/runtime.h ('k') | test/mjsunit/es6/typedarray-copywithin.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-typedarray.cc
diff --git a/src/runtime/runtime-typedarray.cc b/src/runtime/runtime-typedarray.cc
index e7e0f34f88fa3a37e32d9a3c962a89f55478467f..e5f6f4d07c421fe4b6714b46c6c36914ad923647 100644
--- a/src/runtime/runtime-typedarray.cc
+++ b/src/runtime/runtime-typedarray.cc
@@ -56,6 +56,12 @@ BUFFER_VIEW_GETTER(TypedArray, Length, length)
#undef BUFFER_VIEW_GETTER
+RUNTIME_FUNCTION(Runtime_ArrayBufferViewWasNeutered) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(1, args.length());
+ return isolate->heap()->ToBoolean(JSTypedArray::cast(args[0])->WasNeutered());
+}
+
RUNTIME_FUNCTION(Runtime_TypedArrayGetBuffer) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
@@ -214,7 +220,6 @@ RUNTIME_FUNCTION(Runtime_IsTypedArray) {
return isolate->heap()->ToBoolean(args[0]->IsJSTypedArray());
}
-
RUNTIME_FUNCTION(Runtime_IsSharedTypedArray) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/es6/typedarray-copywithin.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698