Fix crashes/assertions when CefBrowserImpl is destroyed on a non-UI thread (issue #694).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@736 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-08-13 16:24:53 +00:00
parent 26a2281486
commit 6ab23a802f
5 changed files with 30 additions and 19 deletions

View File

@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "base/threading/non_thread_safe.h"
#include "base/utf_string_conversions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h"
@@ -38,7 +39,8 @@ namespace {
// Wrapper implementation for WebDOMEventListener.
class CefDOMEventListenerWrapper : public WebDOMEventListener,
public CefTrackNode {
public CefTrackNode,
public base::NonThreadSafe {
public:
CefDOMEventListenerWrapper(CefBrowserImpl* browser, WebFrame* frame,
CefRefPtr<CefDOMEventListener> listener)
@@ -49,7 +51,6 @@ class CefDOMEventListenerWrapper : public WebDOMEventListener,
browser->UIT_AddFrameObject(frame, this);
}
virtual ~CefDOMEventListenerWrapper() {
REQUIRE_UIT();
}
virtual void handleEvent(const WebDOMEvent& event) {