0

[Patch-fix] Fix Saved Desk Lacros crash

This CL is a patch fix for a saved Desk Lacros crash.  It remedys
the issue by exiting early from FullRestoreReadHandler's
OnWindowInitialized function when the window_id is associated with
a saved desk.

Tested: FullRestoreReadAndSaveTests, confirmed proper behavior
manually

Bug: b/261765975
Change-Id: I3c543260e0ae15bd383331523dd1c38f85ea098a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4087151
Commit-Queue: Avynn Donaghe <avynn@google.com>
Reviewed-by: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1081015}
This commit is contained in:
avynn
2022-12-08 19:00:24 +00:00
committed by Chromium LUCI CQ
parent 1077b8673a
commit 713e16cbb8

@@ -54,6 +54,10 @@ FullRestoreReadHandler::~FullRestoreReadHandler() = default;
void FullRestoreReadHandler::OnWindowInitialized(aura::Window* window) {
int32_t window_id = window->GetProperty(app_restore::kRestoreWindowIdKey);
// Patch fix for (b/261765975).
if (window_id < app_restore::kParentToHiddenContainer)
return;
if (app_restore::IsArcWindow(window)) {
// If there isn't restore data for ARC apps, we don't need to handle ARC app
// windows restoration.