diff options
-rw-r--r-- | chrome/renderer/render_view.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/webworker_proxy.cc | 11 | ||||
-rw-r--r-- | chrome/renderer/webworker_proxy.h | 3 |
3 files changed, 6 insertions, 10 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index debff4dc..ae76377 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1978,7 +1978,7 @@ void RenderView::OnMissingPluginStatus(WebPluginDelegate* delegate, WebWorker* RenderView::CreateWebWorker(WebWorkerClient* client) { #if defined(OS_WIN) - return new WebWorkerProxy(this, client); + return new WebWorkerProxy(client); #else // TODO(port): out of process workers NOTIMPLEMENTED(); diff --git a/chrome/renderer/webworker_proxy.cc b/chrome/renderer/webworker_proxy.cc index c271e40..cf6477a 100644 --- a/chrome/renderer/webworker_proxy.cc +++ b/chrome/renderer/webworker_proxy.cc @@ -9,11 +9,8 @@ #include "chrome/renderer/render_thread.h" #include "webkit/glue/webworkerclient.h" -WebWorkerProxy::WebWorkerProxy( - IPC::Message::Sender* sender, WebWorkerClient* client) - : sender_(sender), - route_id_(MSG_ROUTING_NONE), - client_(client) { +WebWorkerProxy::WebWorkerProxy(WebWorkerClient* client) + : route_id_(MSG_ROUTING_NONE), client_(client) { } WebWorkerProxy::~WebWorkerProxy() { @@ -23,7 +20,7 @@ void WebWorkerProxy::StartWorkerContext( const GURL& script_url, const string16& user_agent, const string16& source_code) { - sender_->Send( + RenderThread::current()->Send( new ViewHostMsg_CreateDedicatedWorker(script_url, &route_id_)); if (route_id_ == MSG_ROUTING_NONE) return; @@ -62,7 +59,7 @@ bool WebWorkerProxy::Send(IPC::Message* message) { // TODO(jabdelmalek): handle sync messages if we need them. IPC::Message* wrapped_msg = new ViewHostMsg_ForwardToWorker(*message); delete message; - return sender_->Send(wrapped_msg); + return RenderThread::current()->Send(wrapped_msg); } void WebWorkerProxy::OnMessageReceived(const IPC::Message& message) { diff --git a/chrome/renderer/webworker_proxy.h b/chrome/renderer/webworker_proxy.h index 6967ea0..97a6bb3 100644 --- a/chrome/renderer/webworker_proxy.h +++ b/chrome/renderer/webworker_proxy.h @@ -24,7 +24,7 @@ class Message; class WebWorkerProxy : public WebWorker, public IPC::Channel::Listener { public: - WebWorkerProxy(IPC::Message::Sender* sender, WebWorkerClient* client); + WebWorkerProxy(WebWorkerClient* client); virtual ~WebWorkerProxy(); // WebWorker implementation. @@ -43,7 +43,6 @@ class WebWorkerProxy : public WebWorker, private: bool Send(IPC::Message* message); - IPC::Message::Sender* sender_; int route_id_; // Used to communicate to the WebCore::Worker object in response to IPC |