| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/debug.h" | 8 #include "src/debug.h" |
| 9 #include "src/scopeinfo.h" | 9 #include "src/scopeinfo.h" |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 return Nothing<PropertyAttributes>(); | 134 return Nothing<PropertyAttributes>(); |
| 135 } | 135 } |
| 136 if (!unscopables->IsSpecObject()) return attrs; | 136 if (!unscopables->IsSpecObject()) return attrs; |
| 137 Handle<Object> blacklist; | 137 Handle<Object> blacklist; |
| 138 MaybeHandle<Object> maybe_blacklist = | 138 MaybeHandle<Object> maybe_blacklist = |
| 139 Object::GetProperty(unscopables, it->name()); | 139 Object::GetProperty(unscopables, it->name()); |
| 140 if (!maybe_blacklist.ToHandle(&blacklist)) { | 140 if (!maybe_blacklist.ToHandle(&blacklist)) { |
| 141 DCHECK(isolate->has_pending_exception()); | 141 DCHECK(isolate->has_pending_exception()); |
| 142 return Nothing<PropertyAttributes>(); | 142 return Nothing<PropertyAttributes>(); |
| 143 } | 143 } |
| 144 return blacklist->IsUndefined() ? attrs : Just(ABSENT); | 144 return blacklist->BooleanValue() ? Just(ABSENT) : attrs; |
| 145 } | 145 } |
| 146 | 146 |
| 147 static void GetAttributesAndBindingFlags(VariableMode mode, | 147 static void GetAttributesAndBindingFlags(VariableMode mode, |
| 148 InitializationFlag init_flag, | 148 InitializationFlag init_flag, |
| 149 PropertyAttributes* attributes, | 149 PropertyAttributes* attributes, |
| 150 BindingFlags* binding_flags) { | 150 BindingFlags* binding_flags) { |
| 151 switch (mode) { | 151 switch (mode) { |
| 152 case INTERNAL: // Fall through. | 152 case INTERNAL: // Fall through. |
| 153 case VAR: | 153 case VAR: |
| 154 *attributes = NONE; | 154 *attributes = NONE; |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { | 488 bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { |
| 489 // During bootstrapping we allow all objects to pass as global | 489 // During bootstrapping we allow all objects to pass as global |
| 490 // objects. This is necessary to fix circular dependencies. | 490 // objects. This is necessary to fix circular dependencies. |
| 491 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || | 491 return isolate->heap()->gc_state() != Heap::NOT_IN_GC || |
| 492 isolate->bootstrapper()->IsActive() || | 492 isolate->bootstrapper()->IsActive() || |
| 493 object->IsGlobalObject(); | 493 object->IsGlobalObject(); |
| 494 } | 494 } |
| 495 #endif | 495 #endif |
| 496 | 496 |
| 497 } } // namespace v8::internal | 497 } } // namespace v8::internal |
| OLD | NEW |