summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/profiler-extension.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2016-09-06 22:49:51 +0200
committerMichaël Zasso <targos@protonmail.com>2016-09-22 09:51:19 +0200
commitec02b811a8a5c999bab4de312be2d732b7d9d50b (patch)
treeca3068017254f238cf413a451c57a803572983a4 /deps/v8/test/cctest/profiler-extension.cc
parentd2eb7ce0105369a9cad82787cb33a665e9bd00ad (diff)
downloadnode-new-ec02b811a8a5c999bab4de312be2d732b7d9d50b.tar.gz
deps: update V8 to 5.4.500.27
Pick up latest commit from the 5.4-lkgr branch. deps: edit V8 gitignore to allow trace event copy deps: update V8 trace event to 315bf1e2d45be7d53346c31cfcc37424a32c30c8 deps: edit V8 gitignore to allow gtest_prod.h copy deps: update V8 gtest to 6f8a66431cb592dad629028a50b3dd418a408c87 PR-URL: https://github.com/nodejs/node/pull/8317 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/test/cctest/profiler-extension.cc')
-rw-r--r--deps/v8/test/cctest/profiler-extension.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/deps/v8/test/cctest/profiler-extension.cc b/deps/v8/test/cctest/profiler-extension.cc
index 024cc9c635..df5cec79ce 100644
--- a/deps/v8/test/cctest/profiler-extension.cc
+++ b/deps/v8/test/cctest/profiler-extension.cc
@@ -33,7 +33,8 @@
namespace v8 {
namespace internal {
-v8::CpuProfile* ProfilerExtension::last_profile = NULL;
+v8::CpuProfiler* ProfilerExtension::profiler_ = nullptr;
+v8::CpuProfile* ProfilerExtension::last_profile = nullptr;
const char* ProfilerExtension::kSource =
"native function startProfiling();"
"native function stopProfiling();"
@@ -58,24 +59,22 @@ v8::Local<v8::FunctionTemplate> ProfilerExtension::GetNativeFunctionTemplate(
void ProfilerExtension::StartProfiling(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- last_profile = NULL;
- v8::CpuProfiler* cpu_profiler = args.GetIsolate()->GetCpuProfiler();
- cpu_profiler->StartProfiling((args.Length() > 0)
- ? args[0].As<v8::String>()
- : v8::String::Empty(args.GetIsolate()));
+ last_profile = nullptr;
+ profiler_->StartProfiling(args.Length() > 0
+ ? args[0].As<v8::String>()
+ : v8::String::Empty(args.GetIsolate()));
}
void ProfilerExtension::StopProfiling(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::CpuProfiler* cpu_profiler = args.GetIsolate()->GetCpuProfiler();
- last_profile = cpu_profiler->StopProfiling((args.Length() > 0)
- ? args[0].As<v8::String>()
- : v8::String::Empty(args.GetIsolate()));
+ last_profile = profiler_->StopProfiling(
+ args.Length() > 0 ? args[0].As<v8::String>()
+ : v8::String::Empty(args.GetIsolate()));
}
void ProfilerExtension::CollectSample(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- args.GetIsolate()->GetCpuProfiler()->CollectSample();
+ profiler_->CollectSample();
}
} // namespace internal