| Index: test/cctest/profiler-extension.h
|
| diff --git a/test/cctest/profiler-extension.h b/test/cctest/profiler-extension.h
|
| index 00f9a5a8085fe62c40f0f31202c69fef2efb5852..dbc12f47a002dc39a6f2d48a254089a4cfba7e11 100644
|
| --- a/test/cctest/profiler-extension.h
|
| +++ b/test/cctest/profiler-extension.h
|
| @@ -35,11 +35,20 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| +class CpuProfiler;
|
| +
|
| class ProfilerExtension : public v8::Extension {
|
| public:
|
| ProfilerExtension() : v8::Extension("v8/profiler", kSource) { }
|
| +
|
| virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
|
| v8::Isolate* isolate, v8::Local<v8::String> name);
|
| +
|
| + static void set_profiler(v8::CpuProfiler* profiler) { profiler_ = profiler; }
|
| + static void set_profiler(CpuProfiler* profiler) {
|
| + profiler_ = reinterpret_cast<v8::CpuProfiler*>(profiler);
|
| + }
|
| + static v8::CpuProfiler* profiler() { return profiler_; }
|
| static v8::CpuProfile* last_profile;
|
|
|
| private:
|
| @@ -47,6 +56,7 @@ class ProfilerExtension : public v8::Extension {
|
| static void StopProfiling(const v8::FunctionCallbackInfo<v8::Value>& args);
|
| static void CollectSample(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
| + static v8::CpuProfiler* profiler_;
|
| static const char* kSource;
|
| };
|
|
|
|
|