diff options
author | Michaël Zasso <targos@protonmail.com> | 2021-07-14 11:30:07 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-07-20 15:24:51 +0200 |
commit | 6cdd310275bb0f8056aa0ae6d95614e9ca5b70c7 (patch) | |
tree | 9ed37b19cd668894854b7f469010f7621e63ef81 /deps/v8/tools/debug_helper/get-object-properties.cc | |
parent | c0f10006c82d2d9896a552de98ed146f9542720d (diff) | |
download | node-new-6cdd310275bb0f8056aa0ae6d95614e9ca5b70c7.tar.gz |
deps: update V8 to 9.2.230.21
PR-URL: https://github.com/nodejs/node/pull/38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/tools/debug_helper/get-object-properties.cc')
-rw-r--r-- | deps/v8/tools/debug_helper/get-object-properties.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/deps/v8/tools/debug_helper/get-object-properties.cc b/deps/v8/tools/debug_helper/get-object-properties.cc index 7199bc51d2..b85bbc0590 100644 --- a/deps/v8/tools/debug_helper/get-object-properties.cc +++ b/deps/v8/tools/debug_helper/get-object-properties.cc @@ -316,7 +316,10 @@ class ReadStringVisitor : public TqObjectVisitor { bool IsExternalStringCached(const TqExternalString* object) { // The safest way to get the instance type is to use known map pointers, in // case the map data is not available. - uintptr_t map = GetOrFinish(object->GetMapValue(accessor_)); + Value<uintptr_t> map_ptr = object->GetMapValue(accessor_); + DCHECK_IMPLIES(map_ptr.validity == d::MemoryAccessResult::kOk, + !v8::internal::MapWord::IsPacked(map_ptr.value)); + uintptr_t map = GetOrFinish(map_ptr); if (done_) return false; auto instance_types = FindKnownMapInstanceTypes(map, heap_addresses_); // Exactly one of the matched instance types should be a string type, @@ -347,10 +350,10 @@ class ReadStringVisitor : public TqObjectVisitor { ExternalPointer_t resource_data = GetOrFinish(object->GetResourceDataValue(accessor_)); #ifdef V8_COMPRESS_POINTERS - uintptr_t data_address = static_cast<uintptr_t>( - DecodeExternalPointer(GetPtrComprCageBaseFromOnHeapAddress( - heap_addresses_.any_heap_pointer), - resource_data, kExternalStringResourceDataTag)); + Isolate* isolate = GetIsolateForHeapSandbox( + HeapObject::unchecked_cast(Object(heap_addresses_.any_heap_pointer))); + uintptr_t data_address = static_cast<uintptr_t>(DecodeExternalPointer( + isolate, resource_data, kExternalStringResourceDataTag)); #else uintptr_t data_address = static_cast<uintptr_t>(resource_data); #endif // V8_COMPRESS_POINTERS @@ -500,6 +503,7 @@ class AddInfoVisitor : public TqObjectVisitor { if (map_ptr.validity != d::MemoryAccessResult::kOk) { return; // Can't read the JSObject. Nothing useful to do. } + DCHECK(!v8::internal::MapWord::IsPacked(map_ptr.value)); TqMap map(map_ptr.value); // On JSObject instances, this value is the start of in-object properties. |