| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 */ | 157 */ |
| 158 static Maybe<bool> UnscopableLookup(LookupIterator* it) { | 158 static Maybe<bool> UnscopableLookup(LookupIterator* it) { |
| 159 Isolate* isolate = it->isolate(); | 159 Isolate* isolate = it->isolate(); |
| 160 | 160 |
| 161 Maybe<bool> found = JSReceiver::HasProperty(it); | 161 Maybe<bool> found = JSReceiver::HasProperty(it); |
| 162 if (!found.IsJust() || !found.FromJust()) return found; | 162 if (!found.IsJust() || !found.FromJust()) return found; |
| 163 | 163 |
| 164 Handle<Object> unscopables; | 164 Handle<Object> unscopables; |
| 165 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 165 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
| 166 isolate, unscopables, | 166 isolate, unscopables, |
| 167 Object::GetProperty(it->GetReceiver(), | 167 JSReceiver::GetProperty(Handle<JSReceiver>::cast(it->GetReceiver()), |
| 168 isolate->factory()->unscopables_symbol()), | 168 isolate->factory()->unscopables_symbol()), |
| 169 Nothing<bool>()); | 169 Nothing<bool>()); |
| 170 if (!unscopables->IsJSReceiver()) return Just(true); | 170 if (!unscopables->IsJSReceiver()) return Just(true); |
| 171 Handle<Object> blacklist; | 171 Handle<Object> blacklist; |
| 172 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, blacklist, | 172 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
| 173 Object::GetProperty(unscopables, it->name()), | 173 isolate, blacklist, |
| 174 Nothing<bool>()); | 174 JSReceiver::GetProperty(Handle<JSReceiver>::cast(unscopables), |
| 175 it->name()), |
| 176 Nothing<bool>()); |
| 175 return Just(!blacklist->BooleanValue()); | 177 return Just(!blacklist->BooleanValue()); |
| 176 } | 178 } |
| 177 | 179 |
| 178 static void GetAttributesAndBindingFlags(VariableMode mode, | 180 static void GetAttributesAndBindingFlags(VariableMode mode, |
| 179 InitializationFlag init_flag, | 181 InitializationFlag init_flag, |
| 180 PropertyAttributes* attributes, | 182 PropertyAttributes* attributes, |
| 181 BindingFlags* binding_flags) { | 183 BindingFlags* binding_flags) { |
| 182 switch (mode) { | 184 switch (mode) { |
| 183 case VAR: | 185 case VAR: |
| 184 *attributes = NONE; | 186 *attributes = NONE; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 | 582 |
| 581 int previous_value = errors_thrown()->value(); | 583 int previous_value = errors_thrown()->value(); |
| 582 set_errors_thrown(Smi::FromInt(previous_value + 1)); | 584 set_errors_thrown(Smi::FromInt(previous_value + 1)); |
| 583 } | 585 } |
| 584 | 586 |
| 585 | 587 |
| 586 int Context::GetErrorsThrown() { return errors_thrown()->value(); } | 588 int Context::GetErrorsThrown() { return errors_thrown()->value(); } |
| 587 | 589 |
| 588 } // namespace internal | 590 } // namespace internal |
| 589 } // namespace v8 | 591 } // namespace v8 |
| OLD | NEW |