| 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/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
| 10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
| (...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2580 case CALLBACKS: { | 2580 case CALLBACKS: { |
| 2581 Handle<Name> key(descs->GetKey(i)); | 2581 Handle<Name> key(descs->GetKey(i)); |
| 2582 LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR); | 2582 LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 2583 CHECK_NE(LookupIterator::ACCESS_CHECK, it.state()); | 2583 CHECK_NE(LookupIterator::ACCESS_CHECK, it.state()); |
| 2584 // If the property is already there we skip it | 2584 // If the property is already there we skip it |
| 2585 if (it.IsFound()) continue; | 2585 if (it.IsFound()) continue; |
| 2586 HandleScope inner(isolate()); | 2586 HandleScope inner(isolate()); |
| 2587 DCHECK(!to->HasFastProperties()); | 2587 DCHECK(!to->HasFastProperties()); |
| 2588 // Add to dictionary. | 2588 // Add to dictionary. |
| 2589 Handle<Object> callbacks(descs->GetCallbacksObject(i), isolate()); | 2589 Handle<Object> callbacks(descs->GetCallbacksObject(i), isolate()); |
| 2590 PropertyDetails d = PropertyDetails( | 2590 PropertyDetails d(details.attributes(), CALLBACKS, i + 1); |
| 2591 details.attributes(), CALLBACKS, i + 1); | |
| 2592 JSObject::SetNormalizedProperty(to, key, callbacks, d); | 2591 JSObject::SetNormalizedProperty(to, key, callbacks, d); |
| 2593 break; | 2592 break; |
| 2594 } | 2593 } |
| 2595 } | 2594 } |
| 2596 } | 2595 } |
| 2597 } else { | 2596 } else { |
| 2598 Handle<NameDictionary> properties = | 2597 Handle<NameDictionary> properties = |
| 2599 Handle<NameDictionary>(from->property_dictionary()); | 2598 Handle<NameDictionary>(from->property_dictionary()); |
| 2600 int capacity = properties->Capacity(); | 2599 int capacity = properties->Capacity(); |
| 2601 for (int i = 0; i < capacity; i++) { | 2600 for (int i = 0; i < capacity; i++) { |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2824 return from + sizeof(NestingCounterType); | 2823 return from + sizeof(NestingCounterType); |
| 2825 } | 2824 } |
| 2826 | 2825 |
| 2827 | 2826 |
| 2828 // Called when the top-level V8 mutex is destroyed. | 2827 // Called when the top-level V8 mutex is destroyed. |
| 2829 void Bootstrapper::FreeThreadResources() { | 2828 void Bootstrapper::FreeThreadResources() { |
| 2830 DCHECK(!IsActive()); | 2829 DCHECK(!IsActive()); |
| 2831 } | 2830 } |
| 2832 | 2831 |
| 2833 } } // namespace v8::internal | 2832 } } // namespace v8::internal |
| OLD | NEW |