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

Unified Diff: src/api.cc

Issue 1710253002: Unbreak --gdbjit for embedders. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 56945c8fdd481fe6ff3783779ab576fc62f29ada..20b7d04986422aef44d77a1bf2c819a2822c629f 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"
@@ -7159,10 +7160,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;
+ if (code_event_handler == nullptr && i::FLAG_gdbjit) {
Yang 2016/02/18 22:25:34 could we have the ifdef around the if-statement?
noordhuis 2016/02/19 08:24:43 The idea here was to keep the dead code if !define
Yang 2016/02/19 08:29:38 I still think it's nicer to get rid of the if-stat
+#ifdef ENABLE_GDB_JIT_INTERFACE
+ code_event_handler = i::GDBJITInterface::EventHandler;
+#endif
+ }
+ 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