Commit 5405e763 authored by Aya ElAttar's avatar Aya ElAttar Committed by Commit Bot

Fixed browser crash on trying to access the locked screen mode

On trying to access the locked screen mode in split screen (tablet mode), the browser crashes due to NULL pointer reference.

Bug: b/119853019
Change-Id: Idaf715a9d48f3979243b83bd9fa9e59706f09122
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1685101Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Aya Elsayed <ayaelattar@google.com>
Cr-Commit-Position: refs/heads/master@{#675694}
parent b02e02cc
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "ash/public/cpp/shell_window_ids.h" #include "ash/public/cpp/shell_window_ids.h"
#include "ash/screen_util.h" #include "ash/screen_util.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/wm/desks/desks_util.h"
#include "ash/wm/splitview/split_view_constants.h" #include "ash/wm/splitview/split_view_constants.h"
#include "ash/wm/splitview/split_view_controller.h" #include "ash/wm/splitview/split_view_controller.h"
#include "ash/wm/splitview/split_view_divider_handler_view.h" #include "ash/wm/splitview/split_view_divider_handler_view.h"
...@@ -325,11 +326,10 @@ void SplitViewDivider::UpdateDividerBounds() { ...@@ -325,11 +326,10 @@ void SplitViewDivider::UpdateDividerBounds() {
} }
gfx::Rect SplitViewDivider::GetDividerBoundsInScreen(bool is_dragging) { gfx::Rect SplitViewDivider::GetDividerBoundsInScreen(bool is_dragging) {
aura::Window* root_window =
divider_widget_->GetNativeWindow()->GetRootWindow();
const gfx::Rect work_area_bounds_in_screen = const gfx::Rect work_area_bounds_in_screen =
screen_util::GetDisplayWorkAreaBoundsInScreenForActiveDeskContainer( screen_util::GetDisplayWorkAreaBoundsInScreenForActiveDeskContainer(
root_window); Shell::GetPrimaryRootWindow()->GetChildById(
desks_util::GetActiveDeskContainerId()));
const int divider_position = controller_->divider_position(); const int divider_position = controller_->divider_position();
const OrientationLockType screen_orientation = GetCurrentScreenOrientation(); const OrientationLockType screen_orientation = GetCurrentScreenOrientation();
return GetDividerBoundsInScreen(work_area_bounds_in_screen, return GetDividerBoundsInScreen(work_area_bounds_in_screen,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment