OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_PROTOTYPE_H_ | 5 #ifndef V8_PROTOTYPE_H_ |
6 #define V8_PROTOTYPE_H_ | 6 #define V8_PROTOTYPE_H_ |
7 | 7 |
8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 | 10 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 MaybeHandle<Object> proto = | 167 MaybeHandle<Object> proto = |
168 JSProxy::GetPrototype(Handle<JSProxy>::cast(handle_)); | 168 JSProxy::GetPrototype(Handle<JSProxy>::cast(handle_)); |
169 if (!proto.ToHandle(&handle_)) return false; | 169 if (!proto.ToHandle(&handle_)) return false; |
170 is_at_end_ = | 170 is_at_end_ = |
171 where_to_end_ == END_AT_NON_HIDDEN || handle_->IsNull(isolate_); | 171 where_to_end_ == END_AT_NON_HIDDEN || handle_->IsNull(isolate_); |
172 return true; | 172 return true; |
173 } | 173 } |
174 | 174 |
175 bool IsAtEnd() const { return is_at_end_; } | 175 bool IsAtEnd() const { return is_at_end_; } |
| 176 Isolate* isolate() const { return isolate_; } |
176 | 177 |
177 private: | 178 private: |
178 Isolate* isolate_; | 179 Isolate* isolate_; |
179 Object* object_; | 180 Object* object_; |
180 Handle<Object> handle_; | 181 Handle<Object> handle_; |
181 WhereToEnd where_to_end_; | 182 WhereToEnd where_to_end_; |
182 bool is_at_end_; | 183 bool is_at_end_; |
183 int seen_proxies_; | 184 int seen_proxies_; |
184 | 185 |
185 DISALLOW_COPY_AND_ASSIGN(PrototypeIterator); | 186 DISALLOW_COPY_AND_ASSIGN(PrototypeIterator); |
186 }; | 187 }; |
187 | 188 |
188 | 189 |
189 } // namespace internal | 190 } // namespace internal |
190 | 191 |
191 } // namespace v8 | 192 } // namespace v8 |
192 | 193 |
193 #endif // V8_PROTOTYPE_H_ | 194 #endif // V8_PROTOTYPE_H_ |
OLD | NEW |