mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix cfi-cast failure in CefBrowserMessageLoop::current (issue #2472)
This commit is contained in:
@ -7,7 +7,6 @@
|
|||||||
#include "libcef/common/content_client.h"
|
#include "libcef/common/content_client.h"
|
||||||
|
|
||||||
#include "base/memory/ptr_util.h"
|
#include "base/memory/ptr_util.h"
|
||||||
#include "base/run_loop.h"
|
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||||
@ -103,20 +102,3 @@ CefBrowserMessageLoop::CefBrowserMessageLoop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
~CefBrowserMessageLoop() override;
|
~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:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageLoop);
|
DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageLoop);
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include "libcef/browser/browser_info.h"
|
#include "libcef/browser/browser_info.h"
|
||||||
#include "libcef/browser/browser_info_manager.h"
|
#include "libcef/browser/browser_info_manager.h"
|
||||||
#include "libcef/browser/browser_main.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/chrome_browser_process_stub.h"
|
||||||
#include "libcef/browser/thread_util.h"
|
#include "libcef/browser/thread_util.h"
|
||||||
#include "libcef/browser/trace_subscriber.h"
|
#include "libcef/browser/trace_subscriber.h"
|
||||||
@ -21,6 +20,7 @@
|
|||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/debug/debugger.h"
|
#include "base/debug/debugger.h"
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
|
#include "base/run_loop.h"
|
||||||
#include "base/synchronization/waitable_event.h"
|
#include "base/synchronization/waitable_event.h"
|
||||||
#include "components/network_session_configurator/common/network_switches.h"
|
#include "components/network_session_configurator/common/network_switches.h"
|
||||||
#include "content/app/content_service_manager_main_delegate.h"
|
#include "content/app/content_service_manager_main_delegate.h"
|
||||||
@ -271,7 +271,8 @@ void CefDoMessageLoopWork() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CefBrowserMessageLoop::current()->DoMessageLoopIteration();
|
base::RunLoop run_loop;
|
||||||
|
run_loop.RunUntilIdle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRunMessageLoop() {
|
void CefRunMessageLoop() {
|
||||||
@ -287,7 +288,8 @@ void CefRunMessageLoop() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CefBrowserMessageLoop::current()->RunMessageLoop();
|
base::RunLoop run_loop;
|
||||||
|
run_loop.Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefQuitMessageLoop() {
|
void CefQuitMessageLoop() {
|
||||||
|
Reference in New Issue
Block a user