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

Unified Diff: chrome/common/profiling.cc

Issue 567343002: Move setup of code event handlers to gin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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 | « chrome/common/DEPS ('k') | gin/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/profiling.cc
diff --git a/chrome/common/profiling.cc b/chrome/common/profiling.cc
index 46e7bfc74684141793ea58658cd73cbfce0a6fdd..19cbac7a1975de99a9065a27e253d17e94465f10 100644
--- a/chrome/common/profiling.cc
+++ b/chrome/common/profiling.cc
@@ -13,6 +13,7 @@
#include "base/strings/string_util.h"
#include "base/threading/thread.h"
#include "chrome/common/chrome_switches.h"
+#include "gin/public/debug.h"
#include "v8/include/v8.h"
namespace {
@@ -146,14 +147,11 @@ void Profiling::ProcessStarted() {
add_dynamic_symbol_func = base::debug::GetProfilerAddDynamicSymbolFunc();
move_dynamic_symbol_func = base::debug::GetProfilerMoveDynamicSymbolFunc();
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- if (isolate != NULL &&
- entry_hook_func != NULL &&
+ if (entry_hook_func != NULL &&
add_dynamic_symbol_func != NULL &&
move_dynamic_symbol_func != NULL) {
- v8::V8::SetFunctionEntryHook(isolate, entry_hook_func);
- v8::V8::SetJitCodeEventHandler(v8::kJitCodeEventDefault,
- &JitCodeEventHandler);
+ gin::Debug::SetFunctionEntryHook(entry_hook_func);
+ gin::Debug::SetJitCodeEventHandler(&JitCodeEventHandler);
}
}
« no previous file with comments | « chrome/common/DEPS ('k') | gin/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698