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

Unified Diff: src/objects-printer.cc

Issue 1130063004: Only print elements of a typed array if the buffer wasn't neutered (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 00a1002e0d86130bf0fdda41db7488fd8cbffd98..c9fdcd94ddf7f1a2bea9e7c4d0c8a5a9b602e606 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -719,6 +719,7 @@ void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT
os << " - map = " << reinterpret_cast<void*>(map()) << "\n";
os << " - backing_store = " << backing_store() << "\n";
os << " - byte_length = " << Brief(byte_length());
+ if (was_neutered()) os << " - neutered\n";
os << "\n";
}
@@ -730,8 +731,9 @@ void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT
os << "\n - byte_offset = " << Brief(byte_offset());
os << "\n - byte_length = " << Brief(byte_length());
os << "\n - length = " << Brief(length());
+ if (WasNeutered()) os << " - neutered\n";
os << "\n";
- PrintElements(os);
+ if (!WasNeutered()) PrintElements(os);
}
@@ -741,6 +743,7 @@ void JSDataView::JSDataViewPrint(std::ostream& os) { // NOLINT
os << " - buffer =" << Brief(buffer());
os << "\n - byte_offset = " << Brief(byte_offset());
os << "\n - byte_length = " << Brief(byte_length());
+ if (WasNeutered()) os << " - neutered\n";
os << "\n";
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698