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

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 1715fe0d964da515a66425155510cc83fdea350a..560b70b41da6eb62d4b0b2523a38a9099eed34dd 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(
« no previous file with comments | « content/renderer/browser_render_view_browsertest.cc ('k') | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698