From 78b0f0dfa9e6f3c37b71102c01def92f1ab8c330 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Wed, 13 Feb 2019 23:28:46 +0000 Subject: [PATCH] CastActivityManager: Do not make DoLaunchSessionParams' move constructor noexcept MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the GCC build: ../../chrome/browser/media/router/providers/cast/cast_activity_manager.cc:806:1: error: function ‘media_router::CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(media_router::CastActivityManager::DoLaunchSessionParams&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’ CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams( ^~~~~~~~~~~~~~~~~~~ With GCC, having that noexcept marker requires all members to be marked with noexcept themselves, and MediaRoute, CastMediaSource and url::Origin need the right annotations. Just making DoLaunchSessionParams not noexcept is the least intrusive solution for now. clang is fine because we pass -fno-exceptions and it disables the same error there, while GCC continues to raise it (bug 843143 and its corresponding CL have a longer discussion on this issue). Bug: 819294 Change-Id: Ia3a5fb60b5e74e68bd35cfa50e2fcc728b64e5eb Reviewed-on: https://chromium-review.googlesource.com/c/1469942 Commit-Queue: mark a. foltz Auto-Submit: Raphael Kubo da Costa Reviewed-by: mark a. foltz Cr-Commit-Position: refs/heads/master@{#631962} --- .../media/router/providers/cast/cast_activity_manager.cc | 2 +- .../browser/media/router/providers/cast/cast_activity_manager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager.cc b/chrome/browser/media/router/providers/cast/cast_activity_manager.cc index b7ee9695f69a..8569e0cd30a3 100644 --- a/chrome/browser/media/router/providers/cast/cast_activity_manager.cc +++ b/chrome/browser/media/router/providers/cast/cast_activity_manager.cc @@ -804,7 +804,7 @@ CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams( callback(std::move(callback)) {} CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams( - DoLaunchSessionParams&& other) noexcept = default; + DoLaunchSessionParams&& other) = default; CastActivityManager::DoLaunchSessionParams::~DoLaunchSessionParams() = default; diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager.h b/chrome/browser/media/router/providers/cast/cast_activity_manager.h index 325bffc725ee..08fe0ccca603 100644 --- a/chrome/browser/media/router/providers/cast/cast_activity_manager.h +++ b/chrome/browser/media/router/providers/cast/cast_activity_manager.h @@ -295,7 +295,7 @@ class CastActivityManager : public cast_channel::CastMessageHandler::Observer, const url::Origin& origin, int tab_id, mojom::MediaRouteProvider::CreateRouteCallback callback); - DoLaunchSessionParams(DoLaunchSessionParams&& other) noexcept; + DoLaunchSessionParams(DoLaunchSessionParams&& other); ~DoLaunchSessionParams(); DoLaunchSessionParams& operator=(DoLaunchSessionParams&&) = delete; -- 2.20.1