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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: content/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index ab82879913d45aa360c81c96b848029697817d0c..584f69734c9d6224b5c5bdd55969a7bc256ea237 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -398,7 +398,8 @@ bool BeginSmoothScroll(v8::Isolate* isolate,
// somehow.
context.render_view_impl()->GetWidget()->QueueSyntheticGesture(
std::move(gesture_params),
- base::Bind(&OnSyntheticGestureCompleted, callback_and_context));
+ base::Bind(&OnSyntheticGestureCompleted,
+ base::RetainedRef(callback_and_context)));
return true;
}
@@ -440,7 +441,8 @@ bool BeginSmoothDrag(v8::Isolate* isolate,
// somehow.
context.render_view_impl()->GetWidget()->QueueSyntheticGesture(
std::move(gesture_params),
- base::Bind(&OnSyntheticGestureCompleted, callback_and_context));
+ base::Bind(&OnSyntheticGestureCompleted,
+ base::RetainedRef(callback_and_context)));
return true;
}
@@ -731,7 +733,8 @@ bool GpuBenchmarking::ScrollBounce(gin::Arguments* args) {
// somehow.
context.render_view_impl()->GetWidget()->QueueSyntheticGesture(
std::move(gesture_params),
- base::Bind(&OnSyntheticGestureCompleted, callback_and_context));
+ base::Bind(&OnSyntheticGestureCompleted,
+ base::RetainedRef(callback_and_context)));
return true;
}
@@ -779,7 +782,8 @@ bool GpuBenchmarking::PinchBy(gin::Arguments* args) {
// somehow.
context.render_view_impl()->GetWidget()->QueueSyntheticGesture(
std::move(gesture_params),
- base::Bind(&OnSyntheticGestureCompleted, callback_and_context));
+ base::Bind(&OnSyntheticGestureCompleted,
+ base::RetainedRef(callback_and_context)));
return true;
}
@@ -845,7 +849,8 @@ bool GpuBenchmarking::Tap(gin::Arguments* args) {
// somehow.
context.render_view_impl()->GetWidget()->QueueSyntheticGesture(
std::move(gesture_params),
- base::Bind(&OnSyntheticGestureCompleted, callback_and_context));
+ base::Bind(&OnSyntheticGestureCompleted,
+ base::RetainedRef(callback_and_context)));
return true;
}
@@ -881,7 +886,8 @@ int GpuBenchmarking::RunMicroBenchmark(gin::Arguments* args) {
return context.compositor()->ScheduleMicroBenchmark(
name, std::move(value),
- base::Bind(&OnMicroBenchmarkCompleted, callback_and_context));
+ base::Bind(&OnMicroBenchmarkCompleted,
+ base::RetainedRef(callback_and_context)));
}
bool GpuBenchmarking::SendMessageToMicroBenchmark(

Powered by Google App Engine
This is Rietveld 408576698