Reland "Fix the AppWindowLauncherItemController::GetAppWindow crash issue.""
This reverts commit 93ae228e. Reason for revert: <INSERT REASONING HERE> This CL relands CL:2586647, which is reverted because breaks the test: PluginVmFilesTest.LaunchPluginVmApp The reason is |mock_window| is accessed after free, because after the end of the test, when launcher_item_controller is destroyed, |mock_window| is accessed. Modify the test case, to set the controller, so that |mock_window| can be removed from |launcher_item_controller|'s windows list. Modify AppWindowBase, to check whether widget_ is null in GetNativeWindow to avoid crash, because widget_ is null in the test case. So CL:2586647 can be relanded again. Change-Id: I50cb7b138bda0e588ad97b62297a855df48c0239 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2592077Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Commit-Queue: Nancy Wang <nancylingwang@chromium.org> Cr-Commit-Position: refs/heads/master@{#837660}
Showing
Please register or sign in to comment