| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // When V8 cannot allocated memory FatalProcessOutOfMemory is called. | 208 // When V8 cannot allocated memory FatalProcessOutOfMemory is called. |
| 209 // The default fatal error handler is called and execution is stopped. | 209 // The default fatal error handler is called and execution is stopped. |
| 210 void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { | 210 void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { |
| 211 i::HeapStats heap_stats; | 211 i::HeapStats heap_stats; |
| 212 int start_marker; | 212 int start_marker; |
| 213 heap_stats.start_marker = &start_marker; | 213 heap_stats.start_marker = &start_marker; |
| 214 int new_space_size; | 214 int new_space_size; |
| 215 heap_stats.new_space_size = &new_space_size; | 215 heap_stats.new_space_size = &new_space_size; |
| 216 int new_space_capacity; | 216 int new_space_capacity; |
| 217 heap_stats.new_space_capacity = &new_space_capacity; | 217 heap_stats.new_space_capacity = &new_space_capacity; |
| 218 intptr_t old_space_size; | 218 intptr_t old_pointer_space_size; |
| 219 heap_stats.old_space_size = &old_space_size; | 219 heap_stats.old_pointer_space_size = &old_pointer_space_size; |
| 220 intptr_t old_space_capacity; | 220 intptr_t old_pointer_space_capacity; |
| 221 heap_stats.old_space_capacity = &old_space_capacity; | 221 heap_stats.old_pointer_space_capacity = &old_pointer_space_capacity; |
| 222 intptr_t old_data_space_size; |
| 223 heap_stats.old_data_space_size = &old_data_space_size; |
| 224 intptr_t old_data_space_capacity; |
| 225 heap_stats.old_data_space_capacity = &old_data_space_capacity; |
| 222 intptr_t code_space_size; | 226 intptr_t code_space_size; |
| 223 heap_stats.code_space_size = &code_space_size; | 227 heap_stats.code_space_size = &code_space_size; |
| 224 intptr_t code_space_capacity; | 228 intptr_t code_space_capacity; |
| 225 heap_stats.code_space_capacity = &code_space_capacity; | 229 heap_stats.code_space_capacity = &code_space_capacity; |
| 226 intptr_t map_space_size; | 230 intptr_t map_space_size; |
| 227 heap_stats.map_space_size = &map_space_size; | 231 heap_stats.map_space_size = &map_space_size; |
| 228 intptr_t map_space_capacity; | 232 intptr_t map_space_capacity; |
| 229 heap_stats.map_space_capacity = &map_space_capacity; | 233 heap_stats.map_space_capacity = &map_space_capacity; |
| 230 intptr_t cell_space_size; | 234 intptr_t cell_space_size; |
| 231 heap_stats.cell_space_size = &cell_space_size; | 235 heap_stats.cell_space_size = &cell_space_size; |
| (...skipping 7780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8012 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8016 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 8013 Address callback_address = | 8017 Address callback_address = |
| 8014 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8018 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8015 VMState<EXTERNAL> state(isolate); | 8019 VMState<EXTERNAL> state(isolate); |
| 8016 ExternalCallbackScope call_scope(isolate, callback_address); | 8020 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8017 callback(info); | 8021 callback(info); |
| 8018 } | 8022 } |
| 8019 | 8023 |
| 8020 | 8024 |
| 8021 } } // namespace v8::internal | 8025 } } // namespace v8::internal |
| OLD | NEW |