Index: content/renderer/render_widget.cc |
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc |
index 1f1627271570eef18804e19b273304d829493b61..f3e5a62786140b62f69e66cc9cb1a0c6fa96fb85 100644 |
--- a/content/renderer/render_widget.cc |
+++ b/content/renderer/render_widget.cc |
@@ -835,7 +835,7 @@ void RenderWidget::OnClose() { |
// If there is a Send call on the stack, then it could be dangerous to close |
// now. Post a task that only gets invoked when there are no nested message |
// loops. |
- base::MessageLoop::current()->PostNonNestableTask( |
+ RenderThread::Get()->GetTaskRunner()->PostNonNestableTask( |
FROM_HERE, base::Bind(&RenderWidget::Close, this)); |
// Balances the AddRef taken when we called AddRoute. |
@@ -1507,7 +1507,7 @@ void RenderWidget::closeWidgetSoon() { |
// could be closed before the JS finishes executing. So instead, post a |
// message back to the message loop, which won't run until the JS is |
// complete, and then the Close message can be sent. |
- base::MessageLoop::current()->PostTask( |
+ RenderThread::Get()->GetTaskRunner()->PostTask( |
FROM_HERE, base::Bind(&RenderWidget::DoDeferredClose, this)); |
} |