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

Side by Side Diff: src/api.cc

Issue 2733203002: FunctionEntryHook: require no-snapshot build (Closed)
Patch Set: add flag definition 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 | « BUILD.gn ('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 CHECK(false);
jochen (gone - plz use gerrit) 2017/03/07 10:37:00 can you make this an ApiCheck so it has some usefu
Jakob Kummerow 2017/03/07 10:47:14 Done.
8160 #endif
8157 isolate->set_function_entry_hook(params.entry_hook); 8161 isolate->set_function_entry_hook(params.entry_hook);
8158 } 8162 }
8159 auto code_event_handler = params.code_event_handler; 8163 auto code_event_handler = params.code_event_handler;
8160 #ifdef ENABLE_GDB_JIT_INTERFACE 8164 #ifdef ENABLE_GDB_JIT_INTERFACE
8161 if (code_event_handler == nullptr && i::FLAG_gdbjit) { 8165 if (code_event_handler == nullptr && i::FLAG_gdbjit) {
8162 code_event_handler = i::GDBJITInterface::EventHandler; 8166 code_event_handler = i::GDBJITInterface::EventHandler;
8163 } 8167 }
8164 #endif // ENABLE_GDB_JIT_INTERFACE 8168 #endif // ENABLE_GDB_JIT_INTERFACE
8165 if (code_event_handler) { 8169 if (code_event_handler) {
8166 isolate->InitializeLoggingAndCounters(); 8170 isolate->InitializeLoggingAndCounters();
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
10257 Address callback_address = 10261 Address callback_address =
10258 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10262 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10259 VMState<EXTERNAL> state(isolate); 10263 VMState<EXTERNAL> state(isolate);
10260 ExternalCallbackScope call_scope(isolate, callback_address); 10264 ExternalCallbackScope call_scope(isolate, callback_address);
10261 callback(info); 10265 callback(info);
10262 } 10266 }
10263 10267
10264 10268
10265 } // namespace internal 10269 } // namespace internal
10266 } // namespace v8 10270 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698