| 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 6867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6878 return Integer::New(isolate, static_cast<int32_t>(value)); | 6878 return Integer::New(isolate, static_cast<int32_t>(value)); |
| 6879 } | 6879 } |
| 6880 ENTER_V8(internal_isolate); | 6880 ENTER_V8(internal_isolate); |
| 6881 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); | 6881 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); |
| 6882 return Utils::IntegerToLocal(result); | 6882 return Utils::IntegerToLocal(result); |
| 6883 } | 6883 } |
| 6884 | 6884 |
| 6885 | 6885 |
| 6886 void Isolate::CollectAllGarbage(const char* gc_reason) { | 6886 void Isolate::CollectAllGarbage(const char* gc_reason) { |
| 6887 reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage( | 6887 reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage( |
| 6888 i::Heap::kNoGCFlags, gc_reason); | 6888 i::Heap::kNoGCFlags, gc_reason, v8::kGCCallbackFlagForced); |
| 6889 } | 6889 } |
| 6890 | 6890 |
| 6891 | 6891 |
| 6892 HeapProfiler* Isolate::GetHeapProfiler() { | 6892 HeapProfiler* Isolate::GetHeapProfiler() { |
| 6893 i::HeapProfiler* heap_profiler = | 6893 i::HeapProfiler* heap_profiler = |
| 6894 reinterpret_cast<i::Isolate*>(this)->heap_profiler(); | 6894 reinterpret_cast<i::Isolate*>(this)->heap_profiler(); |
| 6895 return reinterpret_cast<HeapProfiler*>(heap_profiler); | 6895 return reinterpret_cast<HeapProfiler*>(heap_profiler); |
| 6896 } | 6896 } |
| 6897 | 6897 |
| 6898 | 6898 |
| (...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8403 Address callback_address = | 8403 Address callback_address = |
| 8404 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8404 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8405 VMState<EXTERNAL> state(isolate); | 8405 VMState<EXTERNAL> state(isolate); |
| 8406 ExternalCallbackScope call_scope(isolate, callback_address); | 8406 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8407 callback(info); | 8407 callback(info); |
| 8408 } | 8408 } |
| 8409 | 8409 |
| 8410 | 8410 |
| 8411 } // namespace internal | 8411 } // namespace internal |
| 8412 } // namespace v8 | 8412 } // namespace v8 |
| OLD | NEW |