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

Unified Diff: src/api.cc

Issue 1710253002: Unbreak --gdbjit for embedders. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: v2 Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index b33decae64f3fe6e027fcf3f63cdec20924574a1..a71dcfaec31a7725760646d1263013c3811f8d4d 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -35,6 +35,7 @@
#include "src/debug/debug.h"
#include "src/deoptimizer.h"
#include "src/execution.h"
+#include "src/gdb-jit.h"
#include "src/global-handles.h"
#include "src/icu_util.h"
#include "src/isolate-inl.h"
@@ -7160,10 +7161,16 @@ Isolate* Isolate::New(const Isolate::CreateParams& params) {
if (params.entry_hook) {
isolate->set_function_entry_hook(params.entry_hook);
}
- if (params.code_event_handler) {
+ auto code_event_handler = params.code_event_handler;
+#ifdef ENABLE_GDB_JIT_INTERFACE
+ if (code_event_handler == nullptr && i::FLAG_gdbjit) {
+ code_event_handler = i::GDBJITInterface::EventHandler;
+ }
+#endif // ENABLE_GDB_JIT_INTERFACE
+ if (code_event_handler) {
isolate->InitializeLoggingAndCounters();
isolate->logger()->SetCodeEventHandler(kJitCodeEventDefault,
- params.code_event_handler);
+ code_event_handler);
}
if (params.counter_lookup_callback) {
v8_isolate->SetCounterFunction(params.counter_lookup_callback);
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698