mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 86.0.4240.0 (#800218)
- CefURLRequest::Create is no longer supported in the renderer process (see https://crbug.com/891872). Use CefFrame::CreateURLRequest instead. - Mac platform definitions have been changed from `MACOSX` to `MAC` (see https://crbug.com/1105907) and related CMake macro names have been updated. The old `OS_MACOSX` define is still set in code and CMake for backwards compatibility. - Linux ARM build is currently broken (see https://crbug.com/1123214).
This commit is contained in:
@ -1,21 +1,52 @@
|
||||
diff --git base/message_loop/message_loop_current.cc base/message_loop/message_loop_current.cc
|
||||
index 14d7b8fbb596..4cf58414c2f0 100644
|
||||
--- base/message_loop/message_loop_current.cc
|
||||
+++ base/message_loop/message_loop_current.cc
|
||||
@@ -47,6 +47,8 @@ void MessageLoopCurrent::AddDestructionObserver(
|
||||
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
|
||||
index 2a286b4d269b..55ee14d93545 100644
|
||||
--- base/message_loop/message_pump_win.cc
|
||||
+++ base/message_loop/message_pump_win.cc
|
||||
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
void MessageLoopCurrent::RemoveDestructionObserver(
|
||||
+#include "base/task/current_thread.h"
|
||||
#include "base/message_loop/message_pump_win.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -486,7 +487,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
|
||||
TRACE_EVENT1("base",
|
||||
"MessagePumpForUI::ProcessNextWindowsMessage PeekMessage",
|
||||
"sent_messages_in_queue", more_work_is_plausible);
|
||||
- has_msg = ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE;
|
||||
+
|
||||
+ // We should not process all window messages if we are in the context of an
|
||||
+ // OS modal loop, i.e. in the context of a windows API call like MessageBox.
|
||||
+ // This is to ensure that these messages are peeked out by the OS modal loop.
|
||||
+ if (CurrentThread::Get()->os_modal_loop()) {
|
||||
+ // We only peek out WM_PAINT and WM_TIMER here for reasons mentioned above.
|
||||
+ has_msg = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) ||
|
||||
+ PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE);
|
||||
+ } else {
|
||||
+ has_msg = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE;
|
||||
+ }
|
||||
}
|
||||
if (has_msg)
|
||||
more_work_is_plausible |= ProcessMessageHelper(msg);
|
||||
diff --git base/task/current_thread.cc base/task/current_thread.cc
|
||||
index 068c4f837dab..50d1e4a0b770 100644
|
||||
--- base/task/current_thread.cc
|
||||
+++ base/task/current_thread.cc
|
||||
@@ -47,6 +47,8 @@ void CurrentThread::AddDestructionObserver(
|
||||
|
||||
void CurrentThread::RemoveDestructionObserver(
|
||||
DestructionObserver* destruction_observer) {
|
||||
+ if (!current_)
|
||||
+ return;
|
||||
DCHECK(current_->IsBoundToCurrentThread());
|
||||
current_->RemoveDestructionObserver(destruction_observer);
|
||||
}
|
||||
diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h
|
||||
index 462098e2522a..b853e6dc0c40 100644
|
||||
--- base/message_loop/message_loop_current.h
|
||||
+++ base/message_loop/message_loop_current.h
|
||||
@@ -117,6 +117,12 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
diff --git base/task/current_thread.h base/task/current_thread.h
|
||||
index 52c2dbec3cac..9c8d475f50ad 100644
|
||||
--- base/task/current_thread.h
|
||||
+++ base/task/current_thread.h
|
||||
@@ -122,6 +122,12 @@ class BASE_EXPORT CurrentThread {
|
||||
// posted tasks.
|
||||
void SetAddQueueTimeToTasks(bool enable);
|
||||
|
||||
@ -28,7 +59,7 @@ index 462098e2522a..b853e6dc0c40 100644
|
||||
// Enables nested task processing in scope of an upcoming native message loop.
|
||||
// Some unwanted message loops may occur when using common controls or printer
|
||||
// functions. Hence, nested task processing is disabled by default to avoid
|
||||
@@ -183,6 +189,13 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
@@ -187,6 +193,13 @@ class BASE_EXPORT CurrentThread {
|
||||
friend class web::WebTaskEnvironment;
|
||||
|
||||
sequence_manager::internal::SequenceManagerImpl* current_;
|
||||
@ -42,34 +73,3 @@ index 462098e2522a..b853e6dc0c40 100644
|
||||
};
|
||||
|
||||
#if !defined(OS_NACL)
|
||||
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
|
||||
index 4c500064bcd8..9b82c906b659 100644
|
||||
--- base/message_loop/message_pump_win.cc
|
||||
+++ base/message_loop/message_pump_win.cc
|
||||
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include "base/message_loop/message_loop_current.h"
|
||||
#include "base/message_loop/message_pump_win.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -497,7 +498,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
|
||||
TRACE_EVENT1("base",
|
||||
"MessagePumpForUI::ProcessNextWindowsMessage PeekMessage",
|
||||
"sent_messages_in_queue", more_work_is_plausible);
|
||||
- has_msg = ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE;
|
||||
+
|
||||
+ // We should not process all window messages if we are in the context of an
|
||||
+ // OS modal loop, i.e. in the context of a windows API call like MessageBox.
|
||||
+ // This is to ensure that these messages are peeked out by the OS modal loop.
|
||||
+ if (MessageLoopCurrent::Get()->os_modal_loop()) {
|
||||
+ // We only peek out WM_PAINT and WM_TIMER here for reasons mentioned above.
|
||||
+ has_msg = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) ||
|
||||
+ PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE);
|
||||
+ } else {
|
||||
+ has_msg = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE;
|
||||
+ }
|
||||
}
|
||||
if (has_msg)
|
||||
more_work_is_plausible |= ProcessMessageHelper(msg);
|
||||
|
Reference in New Issue
Block a user