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

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

Created:
3 years, 9 months ago by Yuwei
Modified:
3 years, 9 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3029
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} (cherry picked from commit c99c48fc29b8e104b7552cdac7e28f8534c83bb7) Review-Url: https://codereview.chromium.org/2768633002 . Cr-Commit-Position: refs/branch-heads/3029@{#342} Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471} Committed: https://chromium.googlesource.com/chromium/src/+/5dfef632beb0f174ea1d9822805c90dd44958a30

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: 2 (1 generated)
Yuwei
3 years, 9 months ago (2017-03-21 21:11:24 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
5dfef632beb0f174ea1d9822805c90dd44958a30.

Powered by Google App Engine
This is Rietveld 408576698