summaryrefslogtreecommitdiff
path: root/deps/v8/src/source-position-table.h
diff options
context:
space:
mode:
authorMyles Borins <mylesborins@google.com>2017-08-01 11:36:44 -0500
committerMyles Borins <mylesborins@google.com>2017-08-01 15:23:15 -0500
commit0a66b223e149a841669bfad5598e4254589730cb (patch)
tree5ec050f7f78aafbf5b1e0e50d639fb843141e162 /deps/v8/src/source-position-table.h
parent1782b3836ba58ef0da6b687f2bb970c0bd8199ad (diff)
downloadnode-new-0a66b223e149a841669bfad5598e4254589730cb.tar.gz
deps: update V8 to 6.0.286.52
PR-URL: https://github.com/nodejs/node/pull/14004 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/source-position-table.h')
-rw-r--r--deps/v8/src/source-position-table.h15
1 files changed, 13 insertions, 2 deletions
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<ByteArray> 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<ByteArray> table_;
+ int index_ = 0;
PositionTableEntry current_;
DisallowHeapAllocation no_gc;
};