Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: src/lookup.h

Issue 1147863002: Prepare GetProperty(Attributes)WithInterceptor to support elements (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; }
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698