From ad6e1079a1edfff48bf18c25718f65a1d9f8008f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 18 Apr 2018 14:34:39 +0200 Subject: RequestController: Fix pure virtual method call crash Fixes bug introduced by 4b30d82f05064723b9c3684e1c16ae0cf9d71baa where somebody had the bright idea to call reject() from RequestController's destructor. Of course, at this point the subclasses have already been destructed and a pure virtual method call error is triggered. Change-Id: Ida581285828c592a76f9ca981ec780f2711d298e Reviewed-by: Kai Koehne --- src/core/quota_request_controller_impl.cpp | 5 +++++ src/core/quota_request_controller_impl.h | 2 ++ src/core/register_protocol_handler_request_controller_impl.cpp | 5 +++++ src/core/register_protocol_handler_request_controller_impl.h | 2 ++ src/core/request_controller.h | 5 +---- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/core/quota_request_controller_impl.cpp b/src/core/quota_request_controller_impl.cpp index ee94e1cdd..a18ad761d 100644 --- a/src/core/quota_request_controller_impl.cpp +++ b/src/core/quota_request_controller_impl.cpp @@ -54,6 +54,11 @@ QuotaRequestControllerImpl::QuotaRequestControllerImpl( , m_callback(callback) {} +QuotaRequestControllerImpl::~QuotaRequestControllerImpl() +{ + reject(); +} + void QuotaRequestControllerImpl::accepted() { m_context->dispatchCallbackOnIOThread(m_callback, QuotaPermissionContextQt::QUOTA_PERMISSION_RESPONSE_ALLOW); diff --git a/src/core/quota_request_controller_impl.h b/src/core/quota_request_controller_impl.h index dacdce72f..5814895f3 100644 --- a/src/core/quota_request_controller_impl.h +++ b/src/core/quota_request_controller_impl.h @@ -52,6 +52,8 @@ public: const content::StorageQuotaParams ¶ms, const content::QuotaPermissionContext::PermissionCallback &callback); + ~QuotaRequestControllerImpl(); + protected: void accepted() override; void rejected() override; diff --git a/src/core/register_protocol_handler_request_controller_impl.cpp b/src/core/register_protocol_handler_request_controller_impl.cpp index 1e3a15c93..0f24d8812 100644 --- a/src/core/register_protocol_handler_request_controller_impl.cpp +++ b/src/core/register_protocol_handler_request_controller_impl.cpp @@ -54,6 +54,11 @@ RegisterProtocolHandlerRequestControllerImpl::RegisterProtocolHandlerRequestCont , m_handler(handler) {} +RegisterProtocolHandlerRequestControllerImpl::~RegisterProtocolHandlerRequestControllerImpl() +{ + reject(); +} + ProtocolHandlerRegistry *RegisterProtocolHandlerRequestControllerImpl::protocolHandlerRegistry() { content::WebContents *webContents = web_contents(); diff --git a/src/core/register_protocol_handler_request_controller_impl.h b/src/core/register_protocol_handler_request_controller_impl.h index 5ad64210c..64f229ac4 100644 --- a/src/core/register_protocol_handler_request_controller_impl.h +++ b/src/core/register_protocol_handler_request_controller_impl.h @@ -57,6 +57,8 @@ public: content::WebContents *webContents, ProtocolHandler handler); + ~RegisterProtocolHandlerRequestControllerImpl(); + protected: void accepted() override; void rejected() override; diff --git a/src/core/request_controller.h b/src/core/request_controller.h index a15c601d7..ffcf9edac 100644 --- a/src/core/request_controller.h +++ b/src/core/request_controller.h @@ -70,10 +70,7 @@ public: } } - virtual ~RequestController() - { - reject(); - } + virtual ~RequestController() {} protected: virtual void accepted() = 0; -- cgit v1.2.3 From df1d549c56ff6a1214e566336f0c7dad2eacd503 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 20 Apr 2018 14:34:40 +0200 Subject: Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: 6e2354c9971e [Backport] service worker: Skip service worker for all Pepper plugins. 9908339e3989 [Backport] service worker: Disable interception when OBJECT/EMBED uses ImageLoader. 4ec3a984093e [Backport] Merged: [wasm] Avoid integer overflow on function locals check e9ec9ada1c39 [Backport] Enable