| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 <cmath> | 7 #include <cmath> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 6588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6599 Maybe<bool> result = DefinePropertyWithInterceptorInternal( | 6599 Maybe<bool> result = DefinePropertyWithInterceptorInternal( |
| 6600 &it, it.GetInterceptor(), should_throw, *desc); | 6600 &it, it.GetInterceptor(), should_throw, *desc); |
| 6601 if (result.IsNothing() || result.FromJust()) { | 6601 if (result.IsNothing() || result.FromJust()) { |
| 6602 return result; | 6602 return result; |
| 6603 } | 6603 } |
| 6604 // Interceptor modified the store target but failed to set the | 6604 // Interceptor modified the store target but failed to set the |
| 6605 // property. | 6605 // property. |
| 6606 if (!store_target_map.is_null() && | 6606 if (!store_target_map.is_null() && |
| 6607 *store_target_map != it.GetStoreTarget()->map()) { | 6607 *store_target_map != it.GetStoreTarget()->map()) { |
| 6608 it.isolate()->PushStackTraceAndDie( | 6608 it.isolate()->PushStackTraceAndDie( |
| 6609 0xabababaa, v8::ToCData<void*>(it.GetInterceptor()->setter()), | 6609 0xabababaa, v8::ToCData<void*>(it.GetInterceptor()->definer()), |
| 6610 nullptr, 0xabababab); | 6610 nullptr, 0xabababab); |
| 6611 } | 6611 } |
| 6612 Utils::ApiCheck(store_target_map.is_null() || | 6612 Utils::ApiCheck(store_target_map.is_null() || |
| 6613 *store_target_map == it.GetStoreTarget()->map(), | 6613 *store_target_map == it.GetStoreTarget()->map(), |
| 6614 it.IsElement() ? "v8::IndexedPropertySetterCallback" | 6614 it.IsElement() ? "v8::IndexedPropertyDefinerCallback" |
| 6615 : "v8::NamedPropertySetterCallback", | 6615 : "v8::NamedPropertyDefinerCallback", |
| 6616 "Interceptor silently changed store target."); | 6616 "Interceptor silently changed store target."); |
| 6617 } | 6617 } |
| 6618 } | 6618 } |
| 6619 | 6619 |
| 6620 return OrdinaryDefineOwnProperty(&it, desc, should_throw); | 6620 return OrdinaryDefineOwnProperty(&it, desc, should_throw); |
| 6621 } | 6621 } |
| 6622 | 6622 |
| 6623 | 6623 |
| 6624 // ES6 9.1.6.1 | 6624 // ES6 9.1.6.1 |
| 6625 // static | 6625 // static |
| (...skipping 12862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19488 Handle<Object> JSModule::LoadExport(Handle<JSModule> module, | 19488 Handle<Object> JSModule::LoadExport(Handle<JSModule> module, |
| 19489 Handle<String> name) { | 19489 Handle<String> name) { |
| 19490 Isolate* isolate = module->GetIsolate(); | 19490 Isolate* isolate = module->GetIsolate(); |
| 19491 LookupIterator it(module, name); | 19491 LookupIterator it(module, name); |
| 19492 Handle<Cell> cell = Handle<Cell>::cast(JSObject::GetDataProperty(&it)); | 19492 Handle<Cell> cell = Handle<Cell>::cast(JSObject::GetDataProperty(&it)); |
| 19493 return handle(cell->value(), isolate); | 19493 return handle(cell->value(), isolate); |
| 19494 } | 19494 } |
| 19495 | 19495 |
| 19496 } // namespace internal | 19496 } // namespace internal |
| 19497 } // namespace v8 | 19497 } // namespace v8 |
| OLD | NEW |