summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_thread_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-25 23:28:55 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-25 23:28:55 +0000
commitca405d2aa6618928e599d233adc1f937271e2b48 (patch)
tree6a63a236c184657736aad796a0a57ed688441a2e /content/renderer/render_thread_impl.cc
parentaf8630b7c4464d01726af88c3e8942be27106977 (diff)
downloadchromium_src-ca405d2aa6618928e599d233adc1f937271e2b48.zip
chromium_src-ca405d2aa6618928e599d233adc1f937271e2b48.tar.gz
chromium_src-ca405d2aa6618928e599d233adc1f937271e2b48.tar.bz2
Remove usage of ChildProcess::current() and ChildThread::current() other than on the main thread. This is needed so that single process mode will work correctly with the renderer/gpu/utility threads where we will have multiple ChildProcess objects.
While doing this, I made a few cleanups: -FileSystemDispatcher was checking the return value of sending an async IPC, which always returns true. I removed the return value of those methods and updated the callers to not handle the case which never occurs. -IPCWebSocketStreamHandleBridge was posting a task to send an async message which is needless BUG=234172 R=scottmg@chromium.org Review URL: https://codereview.chromium.org/17681004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208575 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_thread_impl.cc')
-rw-r--r--content/renderer/render_thread_impl.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 72e7fb5..21c1f08 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -220,12 +220,16 @@ void AddHistogramSample(void* hist, int sample) {
class RenderThreadImpl::GpuVDAContextLostCallback
: public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback {
public:
- GpuVDAContextLostCallback() {}
+ GpuVDAContextLostCallback()
+ : main_message_loop_(base::MessageLoopProxy::current()) {}
virtual ~GpuVDAContextLostCallback() {}
virtual void onContextLost() {
- ChildThread::current()->message_loop()->PostTask(FROM_HERE, base::Bind(
+ main_message_loop_->PostTask(FROM_HERE, base::Bind(
&RenderThreadImpl::OnGpuVDAContextLoss));
}
+
+ private:
+ scoped_refptr<base::MessageLoopProxy> main_message_loop_;
};
class RenderThreadImpl::RendererContextProviderCommandBuffer
@@ -372,7 +376,7 @@ void RenderThreadImpl::Init() {
midi_message_filter_ = new MIDIMessageFilter(GetIOMessageLoopProxy());
AddFilter(midi_message_filter_.get());
- AddFilter(new IndexedDBMessageFilter);
+ AddFilter(new IndexedDBMessageFilter(sync_message_filter()));
GetContentClient()->renderer()->RenderThreadStarted();