| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 4396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4407 DCHECK_EQ(kAccessor, details.kind()); | 4407 DCHECK_EQ(kAccessor, details.kind()); |
| 4408 Handle<Name> key(descs->GetKey(i)); | 4408 Handle<Name> key(descs->GetKey(i)); |
| 4409 LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR); | 4409 LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 4410 CHECK_NE(LookupIterator::ACCESS_CHECK, it.state()); | 4410 CHECK_NE(LookupIterator::ACCESS_CHECK, it.state()); |
| 4411 // If the property is already there we skip it | 4411 // If the property is already there we skip it |
| 4412 if (it.IsFound()) continue; | 4412 if (it.IsFound()) continue; |
| 4413 HandleScope inner(isolate()); | 4413 HandleScope inner(isolate()); |
| 4414 DCHECK(!to->HasFastProperties()); | 4414 DCHECK(!to->HasFastProperties()); |
| 4415 // Add to dictionary. | 4415 // Add to dictionary. |
| 4416 Handle<Object> callbacks(descs->GetCallbacksObject(i), isolate()); | 4416 Handle<Object> callbacks(descs->GetCallbacksObject(i), isolate()); |
| 4417 PropertyDetails d(details.attributes(), ACCESSOR_CONSTANT, i + 1, | 4417 PropertyDetails d(kAccessor, details.attributes(), i + 1, |
| 4418 PropertyCellType::kMutable); | 4418 PropertyCellType::kMutable); |
| 4419 JSObject::SetNormalizedProperty(to, key, callbacks, d); | 4419 JSObject::SetNormalizedProperty(to, key, callbacks, d); |
| 4420 } | 4420 } |
| 4421 } | 4421 } |
| 4422 } | 4422 } |
| 4423 } else if (from->IsJSGlobalObject()) { | 4423 } else if (from->IsJSGlobalObject()) { |
| 4424 // Copy all keys and values in enumeration order. | 4424 // Copy all keys and values in enumeration order. |
| 4425 Handle<GlobalDictionary> properties = | 4425 Handle<GlobalDictionary> properties = |
| 4426 Handle<GlobalDictionary>(from->global_dictionary()); | 4426 Handle<GlobalDictionary>(from->global_dictionary()); |
| 4427 Handle<FixedArray> key_indices = | 4427 Handle<FixedArray> key_indices = |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4763 } | 4763 } |
| 4764 | 4764 |
| 4765 | 4765 |
| 4766 // Called when the top-level V8 mutex is destroyed. | 4766 // Called when the top-level V8 mutex is destroyed. |
| 4767 void Bootstrapper::FreeThreadResources() { | 4767 void Bootstrapper::FreeThreadResources() { |
| 4768 DCHECK(!IsActive()); | 4768 DCHECK(!IsActive()); |
| 4769 } | 4769 } |
| 4770 | 4770 |
| 4771 } // namespace internal | 4771 } // namespace internal |
| 4772 } // namespace v8 | 4772 } // namespace v8 |
| OLD | NEW |