| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/api.h" | 5 #include "src/api.h" |
| 6 | 6 |
| 7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
| 8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
| 9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
| 10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 void SetResourceConstraints(i::Isolate* isolate, | 867 void SetResourceConstraints(i::Isolate* isolate, |
| 868 const ResourceConstraints& constraints) { | 868 const ResourceConstraints& constraints) { |
| 869 int semi_space_size = constraints.max_semi_space_size(); | 869 int semi_space_size = constraints.max_semi_space_size(); |
| 870 int old_space_size = constraints.max_old_space_size(); | 870 int old_space_size = constraints.max_old_space_size(); |
| 871 int max_executable_size = constraints.max_executable_size(); | 871 int max_executable_size = constraints.max_executable_size(); |
| 872 size_t code_range_size = constraints.code_range_size(); | 872 size_t code_range_size = constraints.code_range_size(); |
| 873 size_t max_pool_size = constraints.max_zone_pool_size(); | 873 size_t max_pool_size = constraints.max_zone_pool_size(); |
| 874 if (semi_space_size != 0 || old_space_size != 0 || | 874 if (semi_space_size != 0 || old_space_size != 0 || |
| 875 max_executable_size != 0 || code_range_size != 0) { | 875 max_executable_size != 0 || code_range_size != 0) { |
| 876 isolate->heap()->ConfigureHeap(semi_space_size, old_space_size, | 876 isolate->heap()->ConfigureHeap(semi_space_size, old_space_size, |
| 877 max_executable_size, code_range_size); | 877 code_range_size); |
| 878 } | 878 } |
| 879 isolate->allocator()->ConfigureSegmentPool(max_pool_size); | 879 isolate->allocator()->ConfigureSegmentPool(max_pool_size); |
| 880 | 880 |
| 881 if (constraints.stack_limit() != NULL) { | 881 if (constraints.stack_limit() != NULL) { |
| 882 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints.stack_limit()); | 882 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints.stack_limit()); |
| 883 isolate->stack_guard()->SetStackLimit(limit); | 883 isolate->stack_guard()->SetStackLimit(limit); |
| 884 } | 884 } |
| 885 } | 885 } |
| 886 | 886 |
| 887 | 887 |
| (...skipping 9585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10473 Address callback_address = | 10473 Address callback_address = |
| 10474 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10474 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 10475 VMState<EXTERNAL> state(isolate); | 10475 VMState<EXTERNAL> state(isolate); |
| 10476 ExternalCallbackScope call_scope(isolate, callback_address); | 10476 ExternalCallbackScope call_scope(isolate, callback_address); |
| 10477 callback(info); | 10477 callback(info); |
| 10478 } | 10478 } |
| 10479 | 10479 |
| 10480 | 10480 |
| 10481 } // namespace internal | 10481 } // namespace internal |
| 10482 } // namespace v8 | 10482 } // namespace v8 |
| OLD | NEW |