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

Issue 2763773002: [Remoting Android] Fix race condition when initializing JniDisplayHandler (Closed)

Created:
3 years, 9 months ago by Yuwei
Modified:
3 years, 9 months ago
Reviewers:
Sergey Ulanov, joedow
CC:
chromium-reviews, chromoting-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Remoting Android] Fix race condition when initializing JniDisplayHandler Previously weak_ptr_ is initialized after the PostTask call so sometimes initialize() may be called earlier than weak_ptr_ being set, ending up with a renderer_.SetDelegate(nullptr) call. In this case the renderer can't report the dimension of the desktop frame to DesktopCanvas and DesktopCanvas will just send broken transformation matrices, causing the renderer to render only a black screen on the view. This CL swaps two lines in JniDisplayHandler's ctor to fix this bug. I'll make a follow up CL to guard the delegate in the renderer. BUG=703240 Review-Url: https://codereview.chromium.org/2763773002 Cr-Commit-Position: refs/heads/master@{#458210} Committed: https://chromium.googlesource.com/chromium/src/+/c99c48fc29b8e104b7552cdac7e28f8534c83bb7

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -2 lines) Patch
M remoting/client/jni/jni_gl_display_handler.cc View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
Yuwei
PTAL Note that the ToT Android client crashes due to some other unrelated issue. I ...
3 years, 9 months ago (2017-03-20 22:01:20 UTC) #2
joedow
lgtm
3 years, 9 months ago (2017-03-20 22:05:24 UTC) #3
Yuwei
On 2017/03/20 22:05:24, joedow wrote: > lgtm Thanks!
3 years, 9 months ago (2017-03-20 22:07:00 UTC) #5
Yuwei
On 2017/03/20 22:05:24, joedow wrote: > lgtm Thanks!
3 years, 9 months ago (2017-03-20 22:07:01 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2763773002/1
3 years, 9 months ago (2017-03-20 22:07:56 UTC) #7
commit-bot: I haz the power
3 years, 9 months ago (2017-03-20 22:46:23 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/c99c48fc29b8e104b7552cdac7e2...

Powered by Google App Engine
This is Rietveld 408576698