mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Create 1453 release branch for CEF1.
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1453@1184 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
31
cef1/libcef/cef_process_sub_thread.cc
Normal file
31
cef1/libcef/cef_process_sub_thread.cc
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright (c) 2010 The Chromium Embedded Framework Authors.
|
||||
// Portions copyright (c) 2010 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "libcef/cef_process_sub_thread.h"
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
CefProcessSubThread::CefProcessSubThread(CefThread::ID identifier)
|
||||
: CefThread(identifier) {}
|
||||
|
||||
CefProcessSubThread::CefProcessSubThread(CefThread::ID identifier,
|
||||
MessageLoop* message_loop)
|
||||
: CefThread(identifier, message_loop) {}
|
||||
|
||||
CefProcessSubThread::~CefProcessSubThread() {
|
||||
// We cannot rely on our base class to stop the thread since we want our
|
||||
// CleanUp function to run.
|
||||
Stop();
|
||||
}
|
||||
|
||||
void CefProcessSubThread::CleanUp() {
|
||||
// Flush any remaining messages. This ensures that any accumulated
|
||||
// Task objects get destroyed before we exit, which avoids noise in
|
||||
// purify leak-test results.
|
||||
MessageLoop::current()->RunUntilIdle();
|
||||
|
||||
CefThread::Cleanup();
|
||||
}
|
Reference in New Issue
Block a user