Index: src/lookup.h |
diff --git a/src/lookup.h b/src/lookup.h |
index 849ce57bd668bd2dbad7b1581907e0f1915c9a29..b8e7c4d2b3b3640572fecdb0cc04fa9e810bfde4 100644 |
--- a/src/lookup.h |
+++ b/src/lookup.h |
@@ -126,7 +126,17 @@ class LookupIterator final BASE_EMBEDDED { |
Isolate* isolate() const { return isolate_; } |
State state() const { return state_; } |
- Handle<Name> name() const { return name_; } |
+ Handle<Name> name() const { |
+ DCHECK(!IsElement()); |
+ return name_; |
+ } |
+ Handle<Name> GetName() { |
+ if (name_.is_null()) { |
+ DCHECK(IsElement()); |
+ name_ = isolate_->factory()->Uint32ToString(index_); |
+ } |
+ return name_; |
+ } |
uint32_t index() const { return index_; } |
bool IsElement() const { return index_ != kMaxUInt32; } |