File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -329,7 +329,8 @@ class V8_EXPORT CpuProfiler {
329329 * Recording the forced sample does not contribute to the aggregated
330330 * profile statistics.
331331 */
332- void CollectSample ();
332+ V8_DEPRECATED (" Use static CollectSample(Isolate*) instead." ,
333+ void CollectSample ());
333334
334335 /* *
335336 * Tells the profiler whether the embedder is idle.
Original file line number Diff line number Diff line change @@ -7312,8 +7312,8 @@ class V8_EXPORT Isolate {
73127312 * is initialized. It is the embedder's responsibility to stop all CPU
73137313 * profiling activities if it has started any.
73147314 */
7315- V8_DEPRECATE_SOON ("CpuProfiler should be created with CpuProfiler::New call.",
7316- CpuProfiler* GetCpuProfiler());
7315+ V8_DEPRECATED ("CpuProfiler should be created with CpuProfiler::New call.",
7316+ CpuProfiler* GetCpuProfiler());
73177317
73187318 /** Returns true if this isolate has a current context. */
73197319 bool InContext();
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ void ProfilerExtension::StopProfiling(
7474
7575void ProfilerExtension::CollectSample (
7676 const v8::FunctionCallbackInfo<v8::Value>& args) {
77- profiler_-> CollectSample ();
77+ v8::CpuProfiler:: CollectSample (args. GetIsolate () );
7878}
7979
8080} // namespace internal
Original file line number Diff line number Diff line change @@ -1473,7 +1473,7 @@ static const char* js_force_collect_sample_source =
14731473 " }" ;
14741474
14751475static void CallCollectSample (const v8::FunctionCallbackInfo<v8::Value>& info) {
1476- i::ProfilerExtension::profiler ()-> CollectSample ();
1476+ v8::CpuProfiler:: CollectSample (info. GetIsolate () );
14771477}
14781478
14791479TEST (CollectSampleAPI) {
You can’t perform that action at this time.
0 commit comments