OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #include "src/contexts.h" | 5 #include "src/contexts.h" |
6 | 6 |
7 #include "src/ast/scopeinfo.h" | 7 #include "src/ast/scopeinfo.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 if (!attrs.IsJust() || attrs.FromJust() == ABSENT) return attrs; | 154 if (!attrs.IsJust() || attrs.FromJust() == ABSENT) return attrs; |
155 | 155 |
156 Handle<Symbol> unscopables_symbol = isolate->factory()->unscopables_symbol(); | 156 Handle<Symbol> unscopables_symbol = isolate->factory()->unscopables_symbol(); |
157 Handle<Object> receiver = it->GetReceiver(); | 157 Handle<Object> receiver = it->GetReceiver(); |
158 Handle<Object> unscopables; | 158 Handle<Object> unscopables; |
159 MaybeHandle<Object> maybe_unscopables = | 159 MaybeHandle<Object> maybe_unscopables = |
160 Object::GetProperty(receiver, unscopables_symbol); | 160 Object::GetProperty(receiver, unscopables_symbol); |
161 if (!maybe_unscopables.ToHandle(&unscopables)) { | 161 if (!maybe_unscopables.ToHandle(&unscopables)) { |
162 return Nothing<PropertyAttributes>(); | 162 return Nothing<PropertyAttributes>(); |
163 } | 163 } |
164 if (!unscopables->IsSpecObject()) return attrs; | 164 if (!unscopables->IsJSReceiver()) return attrs; |
165 Handle<Object> blacklist; | 165 Handle<Object> blacklist; |
166 MaybeHandle<Object> maybe_blacklist = | 166 MaybeHandle<Object> maybe_blacklist = |
167 Object::GetProperty(unscopables, it->name()); | 167 Object::GetProperty(unscopables, it->name()); |
168 if (!maybe_blacklist.ToHandle(&blacklist)) { | 168 if (!maybe_blacklist.ToHandle(&blacklist)) { |
169 DCHECK(isolate->has_pending_exception()); | 169 DCHECK(isolate->has_pending_exception()); |
170 return Nothing<PropertyAttributes>(); | 170 return Nothing<PropertyAttributes>(); |
171 } | 171 } |
172 return blacklist->BooleanValue() ? Just(ABSENT) : attrs; | 172 return blacklist->BooleanValue() ? Just(ABSENT) : attrs; |
173 } | 173 } |
174 | 174 |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 | 579 |
580 int previous_value = errors_thrown()->value(); | 580 int previous_value = errors_thrown()->value(); |
581 set_errors_thrown(Smi::FromInt(previous_value + 1)); | 581 set_errors_thrown(Smi::FromInt(previous_value + 1)); |
582 } | 582 } |
583 | 583 |
584 | 584 |
585 int Context::GetErrorsThrown() { return errors_thrown()->value(); } | 585 int Context::GetErrorsThrown() { return errors_thrown()->value(); } |
586 | 586 |
587 } // namespace internal | 587 } // namespace internal |
588 } // namespace v8 | 588 } // namespace v8 |
OLD | NEW |