Index: content/child/blink_platform_impl.cc |
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc |
index 022f29721f3b52e55f1a52a555cd2b949d5223f9..34964ebc085f4cba002de669a6b4f12c7c9457ee 100644 |
--- a/content/child/blink_platform_impl.cc |
+++ b/content/child/blink_platform_impl.cc |
@@ -1023,10 +1023,13 @@ blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve( |
blink::WebGestureDevice device_source, |
const blink::WebFloatPoint& velocity, |
const blink::WebSize& cumulative_scroll) { |
- auto curve = WebGestureCurveImpl::CreateFromDefaultPlatformCurve( |
- gfx::Vector2dF(velocity.x, velocity.y), |
- gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height)); |
- return curve.release(); |
+ bool is_main_thread = |
+ main_thread_task_runner_.get() && |
+ main_thread_task_runner_->BelongsToCurrentThread(); |
+ return WebGestureCurveImpl::CreateFromDefaultPlatformCurve( |
+ gfx::Vector2dF(velocity.x, velocity.y), |
+ gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height), |
+ is_main_thread).release(); |
} |
void BlinkPlatformImpl::didStartWorkerRunLoop( |