From 0a66b223e149a841669bfad5598e4254589730cb Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Tue, 1 Aug 2017 11:36:44 -0500 Subject: deps: update V8 to 6.0.286.52 PR-URL: https://github.com/nodejs/node/pull/14004 Reviewed-By: Anna Henningsen Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig --- deps/v8/src/source-position-table.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'deps/v8/src/source-position-table.h') diff --git a/deps/v8/src/source-position-table.h b/deps/v8/src/source-position-table.h index 756838d1e5..c77c1ef26e 100644 --- a/deps/v8/src/source-position-table.h +++ b/deps/v8/src/source-position-table.h @@ -61,6 +61,16 @@ class V8_EXPORT_PRIVATE SourcePositionTableBuilder { class V8_EXPORT_PRIVATE SourcePositionTableIterator { public: + // We expose two flavours of the iterator, depending on the argument passed + // to the constructor: + + // Handlified iterator allows allocation, but it needs a handle (and thus + // a handle scope). This is the preferred version. + explicit SourcePositionTableIterator(Handle byte_array); + + // Non-handlified iterator does not need a handle scope, but it disallows + // allocation during its lifetime. This is useful if there is no handle + // scope around. explicit SourcePositionTableIterator(ByteArray* byte_array); void Advance(); @@ -82,8 +92,9 @@ class V8_EXPORT_PRIVATE SourcePositionTableIterator { private: static const int kDone = -1; - ByteArray* table_; - int index_; + ByteArray* raw_table_ = nullptr; + Handle table_; + int index_ = 0; PositionTableEntry current_; DisallowHeapAllocation no_gc; }; -- cgit v1.2.1