mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-03 04:27:43 +01:00
Fix cfi-cast failure in CefBrowserMessageLoop::current (issue #2472)
This commit is contained in:
parent
0d12959a50
commit
7139f01103
@ -7,7 +7,6 @@
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/run_loop.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
@ -103,20 +102,3 @@ CefBrowserMessageLoop::CefBrowserMessageLoop()
|
||||
}
|
||||
|
||||
CefBrowserMessageLoop::~CefBrowserMessageLoop() {}
|
||||
|
||||
// static
|
||||
CefBrowserMessageLoop* CefBrowserMessageLoop::current() {
|
||||
base::MessageLoop* loop = base::MessageLoop::current();
|
||||
DCHECK(loop->IsType(base::MessageLoop::TYPE_UI));
|
||||
return static_cast<CefBrowserMessageLoop*>(loop);
|
||||
}
|
||||
|
||||
void CefBrowserMessageLoop::DoMessageLoopIteration() {
|
||||
base::RunLoop run_loop;
|
||||
run_loop.RunUntilIdle();
|
||||
}
|
||||
|
||||
void CefBrowserMessageLoop::RunMessageLoop() {
|
||||
base::RunLoop run_loop;
|
||||
run_loop.Run();
|
||||
}
|
||||
|
@ -17,15 +17,6 @@ class CefBrowserMessageLoop : public base::MessageLoopForUI {
|
||||
CefBrowserMessageLoop();
|
||||
~CefBrowserMessageLoop() override;
|
||||
|
||||
// Returns the CefBrowserMessageLoop of the current thread.
|
||||
static CefBrowserMessageLoop* current();
|
||||
|
||||
// Do a single interation of the UI message loop.
|
||||
void DoMessageLoopIteration();
|
||||
|
||||
// Run the UI message loop.
|
||||
void RunMessageLoop();
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageLoop);
|
||||
};
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include "libcef/browser/browser_info.h"
|
||||
#include "libcef/browser/browser_info_manager.h"
|
||||
#include "libcef/browser/browser_main.h"
|
||||
#include "libcef/browser/browser_message_loop.h"
|
||||
#include "libcef/browser/chrome_browser_process_stub.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/browser/trace_subscriber.h"
|
||||
@ -21,6 +20,7 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/debug/debugger.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "components/network_session_configurator/common/network_switches.h"
|
||||
#include "content/app/content_service_manager_main_delegate.h"
|
||||
@ -271,7 +271,8 @@ void CefDoMessageLoopWork() {
|
||||
return;
|
||||
}
|
||||
|
||||
CefBrowserMessageLoop::current()->DoMessageLoopIteration();
|
||||
base::RunLoop run_loop;
|
||||
run_loop.RunUntilIdle();
|
||||
}
|
||||
|
||||
void CefRunMessageLoop() {
|
||||
@ -287,7 +288,8 @@ void CefRunMessageLoop() {
|
||||
return;
|
||||
}
|
||||
|
||||
CefBrowserMessageLoop::current()->RunMessageLoop();
|
||||
base::RunLoop run_loop;
|
||||
run_loop.Run();
|
||||
}
|
||||
|
||||
void CefQuitMessageLoop() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user