| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include <iomanip> | 7 #include <iomanip> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 | 133 |
| 134 bool Object::IsPromise(Handle<Object> object) { | 134 bool Object::IsPromise(Handle<Object> object) { |
| 135 if (!object->IsJSObject()) return false; | 135 if (!object->IsJSObject()) return false; |
| 136 auto js_object = Handle<JSObject>::cast(object); | 136 auto js_object = Handle<JSObject>::cast(object); |
| 137 // Promises can't have access checks. | 137 // Promises can't have access checks. |
| 138 if (js_object->map()->is_access_check_needed()) return false; | 138 if (js_object->map()->is_access_check_needed()) return false; |
| 139 auto isolate = js_object->GetIsolate(); | 139 auto isolate = js_object->GetIsolate(); |
| 140 // TODO(dcarney): this should just be read from the symbol registry so as not | 140 // TODO(dcarney): this should just be read from the symbol registry so as not |
| 141 // to be context dependent. | 141 // to be context dependent. |
| 142 auto key = isolate->promise_status(); | 142 auto key = isolate->factory()->promise_status_symbol(); |
| 143 // Shouldn't be possible to throw here. | 143 // Shouldn't be possible to throw here. |
| 144 return JSObject::HasRealNamedProperty(js_object, key).FromJust(); | 144 return JSObject::HasRealNamedProperty(js_object, key).FromJust(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 | 147 |
| 148 MaybeHandle<Object> Object::GetProperty(LookupIterator* it, | 148 MaybeHandle<Object> Object::GetProperty(LookupIterator* it, |
| 149 LanguageMode language_mode) { | 149 LanguageMode language_mode) { |
| 150 for (; it->IsFound(); it->Next()) { | 150 for (; it->IsFound(); it->Next()) { |
| 151 switch (it->state()) { | 151 switch (it->state()) { |
| 152 case LookupIterator::NOT_FOUND: | 152 case LookupIterator::NOT_FOUND: |
| (...skipping 15515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15668 if (cell->value() != *new_value) { | 15668 if (cell->value() != *new_value) { |
| 15669 cell->set_value(*new_value); | 15669 cell->set_value(*new_value); |
| 15670 Isolate* isolate = cell->GetIsolate(); | 15670 Isolate* isolate = cell->GetIsolate(); |
| 15671 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 15671 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 15672 isolate, DependentCode::kPropertyCellChangedGroup); | 15672 isolate, DependentCode::kPropertyCellChangedGroup); |
| 15673 } | 15673 } |
| 15674 } | 15674 } |
| 15675 | 15675 |
| 15676 } // namespace internal | 15676 } // namespace internal |
| 15677 } // namespace v8 | 15677 } // namespace v8 |
| OLD | NEW |