Commit 7f83ddac authored by Yeol's avatar Yeol Committed by Commit Bot

Fixed crash when AddLabelledRowToGridLayout() is called on Mac.

When calling AddView from AddLabelledRowToGridLayout,
released unique_ptr to pass to argument.

Bug: 948287
Change-Id: I71373a27ee7b8c7ae3bf8c1fdb8eed86b806eac2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1644889
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666281}
parent b5f23e7e
...@@ -56,7 +56,7 @@ void AddLabelledRowToGridLayout(GridLayout* layout, ...@@ -56,7 +56,7 @@ void AddLabelledRowToGridLayout(GridLayout* layout,
const float kRowDoesNotResizeVertically = 0.0; const float kRowDoesNotResizeVertically = 0.0;
const int kPaddingRowHeight = 8; const int kPaddingRowHeight = 8;
layout->StartRow(kRowDoesNotResizeVertically, kStretchyGridColumnSetId); layout->StartRow(kRowDoesNotResizeVertically, kStretchyGridColumnSetId);
layout->AddView(MakePlainLabel(label_text).get()); layout->AddView(MakePlainLabel(label_text).release());
for (auto& view : views) for (auto& view : views)
layout->AddView(view.release()); layout->AddView(view.release());
// This gets added extraneously after the last row, but it doesn't hurt and // This gets added extraneously after the last row, but it doesn't hurt and
......
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