| 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 8103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8114 if (params.create_histogram_callback) { | 8114 if (params.create_histogram_callback) { |
| 8115 v8_isolate->SetCreateHistogramFunction(params.create_histogram_callback); | 8115 v8_isolate->SetCreateHistogramFunction(params.create_histogram_callback); |
| 8116 } | 8116 } |
| 8117 | 8117 |
| 8118 if (params.add_histogram_sample_callback) { | 8118 if (params.add_histogram_sample_callback) { |
| 8119 v8_isolate->SetAddHistogramSampleFunction( | 8119 v8_isolate->SetAddHistogramSampleFunction( |
| 8120 params.add_histogram_sample_callback); | 8120 params.add_histogram_sample_callback); |
| 8121 } | 8121 } |
| 8122 | 8122 |
| 8123 isolate->set_api_external_references(params.external_references); | 8123 isolate->set_api_external_references(params.external_references); |
| 8124 isolate->set_allow_atomics_wait(params.allow_atomics_wait); |
| 8124 SetResourceConstraints(isolate, params.constraints); | 8125 SetResourceConstraints(isolate, params.constraints); |
| 8125 // TODO(jochen): Once we got rid of Isolate::Current(), we can remove this. | 8126 // TODO(jochen): Once we got rid of Isolate::Current(), we can remove this. |
| 8126 Isolate::Scope isolate_scope(v8_isolate); | 8127 Isolate::Scope isolate_scope(v8_isolate); |
| 8127 if (params.entry_hook || !i::Snapshot::Initialize(isolate)) { | 8128 if (params.entry_hook || !i::Snapshot::Initialize(isolate)) { |
| 8128 isolate->Init(NULL); | 8129 isolate->Init(NULL); |
| 8129 } | 8130 } |
| 8130 return v8_isolate; | 8131 return v8_isolate; |
| 8131 } | 8132 } |
| 8132 | 8133 |
| 8133 | 8134 |
| (...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10005 Address callback_address = | 10006 Address callback_address = |
| 10006 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10007 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 10007 VMState<EXTERNAL> state(isolate); | 10008 VMState<EXTERNAL> state(isolate); |
| 10008 ExternalCallbackScope call_scope(isolate, callback_address); | 10009 ExternalCallbackScope call_scope(isolate, callback_address); |
| 10009 callback(info); | 10010 callback(info); |
| 10010 } | 10011 } |
| 10011 | 10012 |
| 10012 | 10013 |
| 10013 } // namespace internal | 10014 } // namespace internal |
| 10014 } // namespace v8 | 10015 } // namespace v8 |
| OLD | NEW |