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

Unified Diff: src/objects-inl.h

Issue 2793233003: Revert of [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 | « src/js/typedarray.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index eda53920776aeeb86b7a12c898f8c6ff5e03dbcc..6fd03f2aa9d944d14b33ae764486ea37263c257e 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6903,18 +6903,8 @@
THROW_NEW_ERROR(isolate, NewTypeError(message), JSTypedArray);
}
- Handle<JSTypedArray> array = Handle<JSTypedArray>::cast(receiver);
- if (V8_UNLIKELY(array->WasNeutered())) {
- const MessageTemplate::Template message =
- MessageTemplate::kDetachedOperation;
- Handle<String> operation =
- isolate->factory()->NewStringFromAsciiChecked(method_name);
- THROW_NEW_ERROR(isolate, NewTypeError(message, operation), JSTypedArray);
- }
-
- // spec describes to return `buffer`, but it may disrupt current
- // implementations, and it's much useful to return array for now.
- return array;
+ // TODO(caitp): throw if array.[[ViewedArrayBuffer]] is neutered (per v8:4648)
+ return Handle<JSTypedArray>::cast(receiver);
}
#ifdef VERIFY_HEAP
« no previous file with comments | « src/js/typedarray.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698