From 740d4ba9b72ce129013758a6831ee6ed744ca076 Mon Sep 17 00:00:00 2001 From: mlamouri Date: Wed, 15 Oct 2014 10:04:07 -0700 Subject: [PATCH] [screen-orientation] Add missing returns after sending error notification. The issue was found and fixed by jonross@ in https://codereview.chromium.org/648733003/. I moved it away from his CL because he is OOO and it would be better to get this fixed sooner than later. BUG=162827 Review URL: https://codereview.chromium.org/655273003 Cr-Commit-Position: refs/heads/master@{#299699} --- content/public/browser/screen_orientation_provider.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/public/browser/screen_orientation_provider.cc b/content/public/browser/screen_orientation_provider.cc index 07c4c9323e5b..35a07eeffde6 100644 --- a/content/public/browser/screen_orientation_provider.cc +++ b/content/public/browser/screen_orientation_provider.cc @@ -47,17 +47,19 @@ void ScreenOrientationProvider::LockOrientation(int request_id, if (!rvh) { dispatcher_->NotifyLockError(request_id, blink::WebLockOrientationErrorCanceled); + return; } RenderViewHostDelegate* rvhd = rvh->GetDelegate(); if (!rvhd) { dispatcher_->NotifyLockError(request_id, blink::WebLockOrientationErrorCanceled); + return; } if (!rvhd->IsFullscreenForCurrentTab()) { dispatcher_->NotifyLockError(request_id, blink::WebLockOrientationErrorFullScreenRequired); + return; } - return; } if (lock_orientation == blink::WebScreenOrientationLockNatural) { -- 2.11.4.GIT