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

Issue 1132313003: Don't destroy the window in PlatformWindow's destructor. (Closed)

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

Description

Don't destroy the window in PlatformWindow's destructor. This should have already been closed before we get to the destructor. Otherwise we get double deletes since the Destroy() call can end up calling the delegate which will delete this object. Also in the X11 implementation, don't call delegate's OnClosed() before null'ing xwindow_, otherwise Destroy() can be called multiple times. This is split off https://codereview.chromium.org/1139673003 BUG=484234 Committed: https://crrev.com/133ead2f6c4ecf2efb8905fb4cbfaada614847fc Cr-Commit-Position: refs/heads/master@{#330381}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -4 lines) Patch
M ui/platform_window/win/win_window.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/platform_window/x11/x11_window.cc View 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
jam
5 years, 7 months ago (2015-05-18 16:08:58 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1132313003/1
5 years, 7 months ago (2015-05-18 16:16:17 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-18 17:13:46 UTC) #6
Ben Goodger (Google)
lgtm
5 years, 7 months ago (2015-05-18 18:20:41 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1132313003/1
5 years, 7 months ago (2015-05-18 18:24:32 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 7 months ago (2015-05-18 20:00:34 UTC) #10
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/133ead2f6c4ecf2efb8905fb4cbfaada614847fc Cr-Commit-Position: refs/heads/master@{#330381}
5 years, 7 months ago (2015-05-18 22:40:51 UTC) #11
eugenis
5 years, 7 months ago (2015-05-19 17:43:42 UTC) #12
Message was sent while issue was closed.
This change is causing HANDLE LEAK reports on DrMemory/Windows.

http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Unit%20%28...

HANDLE LEAK: USER handle 0x00040200 and 90 similar handle(s) were opened but not
closed:
# 0 system call NtUserCreateWindowEx
# 1 USER32.dll!UnregisterClassW                                           +0x963
   (0x7548a8e8 <USER32.dll+0x1a8e8>)
# 2 USER32.dll!UnregisterClassW                                           +0xab7
   (0x7548aa3c <USER32.dll+0x1aa3c>)
# 3 USER32.dll!CreateWindowExW                                            +0x32 
   (0x75488a5c <USER32.dll+0x18a5c>)
# 4 gfx.dll!gfx::WindowImpl::Init                                         
[ui\gfx\win\window_impl.cc:214]
# 5 win_window.dll!ui::WinWindow::WinWindow                               
[ui\platform_window\win\win_window.cc:47]
# 6 aura.dll!aura::WindowTreeHostWin::WindowTreeHostWin                   
[ui\aura\window_tree_host_win.cc:48]
# 7 aura.dll!aura::WindowTreeHost::Create                                 
[ui\aura\window_tree_host_win.cc:36]
# 8 aura::TestScreen::CreateHostForPrimaryDisplay                         
[ui\aura\test\test_screen.cc:46]
# 9 aura::test::AuraTestHelper::SetUp                                     
[ui\aura\test\aura_test_helper.cc:70]
#10 content::RenderViewHostTestHarness::SetUp                             
[content\public\test\test_renderer_host.cc:195]
#11 content::NavigationControllerTest::SetUp                              
[content\browser\frame_host\navigation_controller_impl_unittest.cc:194]
#12 testing::internal::HandleExceptionsInMethodIfSupported<>              
[testing\gtest\src\gtest.cc:2420]
Note: @0:11:26.806 in thread 1288

Powered by Google App Engine
This is Rietveld 408576698