diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-10 16:19:40 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-10 16:01:50 +0000 |
commit | 51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch) | |
tree | 835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/v8/src/address-map.h | |
parent | 6036726eb981b6c4b42047513b9d3f4ac865daac (diff) | |
download | qtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz |
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/v8/src/address-map.h')
-rw-r--r-- | chromium/v8/src/address-map.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chromium/v8/src/address-map.h b/chromium/v8/src/address-map.h index 599e44724ab..f7a1cc2ad9a 100644 --- a/chromium/v8/src/address-map.h +++ b/chromium/v8/src/address-map.h @@ -56,11 +56,14 @@ class RootIndexMap { public: explicit RootIndexMap(Isolate* isolate); - static const int kInvalidRootIndex = -1; - - int Lookup(HeapObject* obj) { + // Returns true on successful lookup and sets *|out_root_list|. + bool Lookup(HeapObject* obj, RootIndex* out_root_list) { Maybe<uint32_t> maybe_index = map_->Get(obj); - return maybe_index.IsJust() ? maybe_index.FromJust() : kInvalidRootIndex; + if (maybe_index.IsJust()) { + *out_root_list = static_cast<RootIndex>(maybe_index.FromJust()); + return true; + } + return false; } private: |