Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Merge M48] mac: Fix unit test crash.
Browse files Browse the repository at this point in the history
> The test OmniboxPopupViewMacTest was crashing because of an invalid pointer
> dereference. The root cause was that a base::scoped_nsobject member was captured
> as an implicit parameter to an Obj-C block, which makes a raw copy of the |this|
> pointer. I changed the captured parameter to be an Obj-C object, which
> automatically gets retained/released.
>
> BUG=551007, 560482
>
> Review URL: https://codereview.chromium.org/1466333004
>
> Cr-Commit-Position: refs/heads/master@{#362184}

(cherry picked from commit 36c234e)
TBR=mark@chromium.org
BUG=560482

Review URL: https://codereview.chromium.org/1486393002 .

Cr-Commit-Position: refs/branch-heads/2564@{#194}
Cr-Branched-From: 1283eca-refs/heads/master@{#359700}
  • Loading branch information
erikchen committed Dec 2, 2015
1 parent cccd9ad commit 08d0a87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,9 @@
// |popup_| gets redrawn once the animation completes. See
// http://crbug.com/538590 and http://crbug.com/551007 .
if (base::mac::IsOSElCapitanOrLater()) {
NSWindow* popup = popup_.get();
[[NSAnimationContext currentContext] setCompletionHandler:^{
[popup_ display];
[popup display];
}];
}
[[popup_ animator] setFrame:popup_frame display:YES];
Expand Down

0 comments on commit 08d0a87

Please sign in to comment.