diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2018-01-24 20:16:06 +0100 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-01-24 15:02:20 -0800 |
commit | 4c4af643e5042d615a60c6bbc05aee9d81b903e5 (patch) | |
tree | 3fb0a97988fe4439ae3ae06f26915d1dcf8cab92 /deps/v8/src/heap/array-buffer-tracker.h | |
parent | fa9f31a4fda5a3782c652e56e394465805ebb50f (diff) | |
download | node-new-4c4af643e5042d615a60c6bbc05aee9d81b903e5.tar.gz |
deps: update V8 to 6.4.388.40
PR-URL: https://github.com/nodejs/node/pull/17489
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/heap/array-buffer-tracker.h')
-rw-r--r-- | deps/v8/src/heap/array-buffer-tracker.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/deps/v8/src/heap/array-buffer-tracker.h b/deps/v8/src/heap/array-buffer-tracker.h index 3c8def3e3a..7bfc1b83f6 100644 --- a/deps/v8/src/heap/array-buffer-tracker.h +++ b/deps/v8/src/heap/array-buffer-tracker.h @@ -34,9 +34,9 @@ class ArrayBufferTracker : public AllStatic { inline static void RegisterNew(Heap* heap, JSArrayBuffer* buffer); inline static void Unregister(Heap* heap, JSArrayBuffer* buffer); - // Frees all backing store pointers for dead JSArrayBuffers in new space. + // Identifies all backing store pointers for dead JSArrayBuffers in new space. // Does not take any locks and can only be called during Scavenge. - static void FreeDeadInNewSpace(Heap* heap); + static void PrepareToFreeDeadInNewSpace(Heap* heap); // Number of array buffer bytes retained from new space. static size_t RetainedInNewSpace(Heap* heap); @@ -101,7 +101,14 @@ class LocalArrayBufferTracker { size_t retained_size() const { return retained_size_; } private: - typedef std::unordered_set<JSArrayBuffer*> TrackingData; + class Hasher { + public: + size_t operator()(JSArrayBuffer* buffer) const { + return reinterpret_cast<size_t>(buffer) >> 3; + } + }; + + typedef std::unordered_set<JSArrayBuffer*, Hasher> TrackingData; Heap* heap_; // The set contains raw heap pointers which are removed by the GC upon |