Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: src/api.cc

Issue 2733203002: FunctionEntryHook: require no-snapshot build (Closed)
Patch Set: fix nit Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 8136 matching lines...) Expand 10 before | Expand all | Expand 10 after
8147 i::Isolate* isolate = new i::Isolate(false); 8147 i::Isolate* isolate = new i::Isolate(false);
8148 Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate); 8148 Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate);
8149 CHECK(params.array_buffer_allocator != NULL); 8149 CHECK(params.array_buffer_allocator != NULL);
8150 isolate->set_array_buffer_allocator(params.array_buffer_allocator); 8150 isolate->set_array_buffer_allocator(params.array_buffer_allocator);
8151 if (params.snapshot_blob != NULL) { 8151 if (params.snapshot_blob != NULL) {
8152 isolate->set_snapshot_blob(params.snapshot_blob); 8152 isolate->set_snapshot_blob(params.snapshot_blob);
8153 } else { 8153 } else {
8154 isolate->set_snapshot_blob(i::Snapshot::DefaultSnapshotBlob()); 8154 isolate->set_snapshot_blob(i::Snapshot::DefaultSnapshotBlob());
8155 } 8155 }
8156 if (params.entry_hook) { 8156 if (params.entry_hook) {
8157 #ifdef V8_USE_SNAPSHOT
8158 // Setting a FunctionEntryHook is only supported in no-snapshot builds.
8159 Utils::ApiCheck(
8160 false, "v8::Isolate::New",
8161 "Setting a FunctionEntryHook is only supported in no-snapshot builds.");
8162 #endif
8157 isolate->set_function_entry_hook(params.entry_hook); 8163 isolate->set_function_entry_hook(params.entry_hook);
8158 } 8164 }
8159 auto code_event_handler = params.code_event_handler; 8165 auto code_event_handler = params.code_event_handler;
8160 #ifdef ENABLE_GDB_JIT_INTERFACE 8166 #ifdef ENABLE_GDB_JIT_INTERFACE
8161 if (code_event_handler == nullptr && i::FLAG_gdbjit) { 8167 if (code_event_handler == nullptr && i::FLAG_gdbjit) {
8162 code_event_handler = i::GDBJITInterface::EventHandler; 8168 code_event_handler = i::GDBJITInterface::EventHandler;
8163 } 8169 }
8164 #endif // ENABLE_GDB_JIT_INTERFACE 8170 #endif // ENABLE_GDB_JIT_INTERFACE
8165 if (code_event_handler) { 8171 if (code_event_handler) {
8166 isolate->InitializeLoggingAndCounters(); 8172 isolate->InitializeLoggingAndCounters();
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
10257 Address callback_address = 10263 Address callback_address =
10258 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10264 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10259 VMState<EXTERNAL> state(isolate); 10265 VMState<EXTERNAL> state(isolate);
10260 ExternalCallbackScope call_scope(isolate, callback_address); 10266 ExternalCallbackScope call_scope(isolate, callback_address);
10261 callback(info); 10267 callback(info);
10262 } 10268 }
10263 10269
10264 10270
10265 } // namespace internal 10271 } // namespace internal
10266 } // namespace v8 10272 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698