Commit 0ed09181 authored by jbauman's avatar jbauman Committed by Commit bot

Avoid crashing if multiple target popup is empty.

If the bitmap wasn't allocated, return false instead.

BUG=411505

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

Cr-Commit-Position: refs/heads/master@{#314009}
parent 0c814423
......@@ -3932,7 +3932,7 @@ bool RenderViewImpl::didTapMultipleTargets(
touch_rect, target_rects, GetSize(),
gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(),
device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect);
if (!new_total_scale)
if (!new_total_scale || zoom_rect.IsEmpty())
return false;
bool handled = false;
......@@ -3947,6 +3947,7 @@ bool RenderViewImpl::didTapMultipleTargets(
RenderThreadImpl::current()->shared_bitmap_manager();
scoped_ptr<cc::SharedBitmap> shared_bitmap =
manager->AllocateSharedBitmap(canvas_size);
CHECK(!!shared_bitmap);
{
SkBitmap bitmap;
SkImageInfo info = SkImageInfo::MakeN32Premul(canvas_size.width(),
......
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