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

Issue 1130353008: Ensure that NativeViewport destructs correctly on Linux. (Closed)

Created:
5 years, 7 months ago by jam
Modified:
5 years, 7 months ago
Reviewers:
Elliot Glaysher
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure that NativeViewport destructs correctly on Linux. First, PlatformEventSource is a singleton so it shouldn't be created by PlatformViewportX11. Once we have multiple windows, this will be very clear. Until then, we also have UAFs on destruction of PlatformViewportX11 because PlatformEventSource could be lower in the stack calling a PlatformViewportX11 method which cause both of these objects to be deleted. Second, ensure that child windows of the PlatformViewport aren't used after the parent window is destructed, otherwise we get X errors. This is done by ensuring that NativeViewportImpl, which owns the PlatformViewport, destructs OnscreenContextProvider first. OnscreenContextProvider will in turn destroy all windows in the CommandBufferDriver that it created. Lastly, make NativeViewportImpl destroy itself when its platform window is closed (i.e. because the user closed the window). The old implementation in that method didn't do anything. This is split off https://codereview.chromium.org/1139673003 BUG=484234 Committed: https://crrev.com/6345ee9d16605252a476a845cd40cb101dd5449d Cr-Commit-Position: refs/heads/master@{#330394}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -26 lines) Patch
M components/gles2/command_buffer_driver.h View 6 chunks +18 lines, -4 lines 0 comments Download
M components/gles2/command_buffer_driver.cc View 4 chunks +25 lines, -6 lines 0 comments Download
M components/native_viewport/native_viewport_application_delegate.h View 2 chunks +5 lines, -0 lines 0 comments Download
M components/native_viewport/native_viewport_application_delegate.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M components/native_viewport/native_viewport_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M components/native_viewport/native_viewport_impl.cc View 6 chunks +10 lines, -6 lines 0 comments Download
M components/native_viewport/onscreen_context_provider.h View 2 chunks +5 lines, -0 lines 0 comments Download
M components/native_viewport/onscreen_context_provider.cc View 3 chunks +20 lines, -4 lines 0 comments Download
M components/native_viewport/platform_viewport_x11.cc View 3 chunks +0 lines, -5 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
jam
5 years, 7 months ago (2015-05-18 18:16:31 UTC) #2
Elliot Glaysher
rubber stamp lgtm, since I've already reviewed this in the other patch.
5 years, 7 months ago (2015-05-18 18:20:43 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1130353008/1
5 years, 7 months ago (2015-05-18 18:22:12 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 7 months ago (2015-05-18 20:18:35 UTC) #6
commit-bot: I haz the power
5 years, 7 months ago (2015-05-18 22:41:43 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/6345ee9d16605252a476a845cd40cb101dd5449d
Cr-Commit-Position: refs/heads/master@{#330394}

Powered by Google App Engine
This is Rietveld 408576698