Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: webkit/glue/webworker_impl.cc

Issue 126086: Switch child threads so that current() only works on the correct thread and t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/worker/worker_thread.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 8
9 #include "GenericWorkerTask.h" 9 #include "GenericWorkerTask.h"
10 #include "KURL.h" 10 #include "KURL.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 void WebWorkerImpl::PostMessageToWorkerContextTask( 66 void WebWorkerImpl::PostMessageToWorkerContextTask(
67 WebCore::ScriptExecutionContext* context, 67 WebCore::ScriptExecutionContext* context,
68 WebWorkerImpl* this_ptr, 68 WebWorkerImpl* this_ptr,
69 const WebCore::String& message) { 69 const WebCore::String& message) {
70 DCHECK(context->isWorkerContext()); 70 DCHECK(context->isWorkerContext());
71 WebCore::WorkerContext* worker_context = 71 WebCore::WorkerContext* worker_context =
72 static_cast<WebCore::WorkerContext*>(context); 72 static_cast<WebCore::WorkerContext*>(context);
73 worker_context->dispatchMessage(message); 73 worker_context->dispatchMessage(message);
74 74
75 this_ptr->client_->confirmMessageFromWorkerObject( 75 this_ptr->confirmMessageFromWorkerObject(
76 worker_context->hasPendingActivity()); 76 worker_context->hasPendingActivity());
77 } 77 }
78 78
79 // WebWorker ------------------------------------------------------------------- 79 // WebWorker -------------------------------------------------------------------
80 80
81 void WebWorkerImpl::startWorkerContext(const WebURL& script_url, 81 void WebWorkerImpl::startWorkerContext(const WebURL& script_url,
82 const WebString& user_agent, 82 const WebString& user_agent,
83 const WebString& source_code) { 83 const WebString& source_code) {
84 worker_thread_ = WebCore::WorkerThread::create( 84 worker_thread_ = WebCore::WorkerThread::create(
85 webkit_glue::WebURLToKURL(script_url), 85 webkit_glue::WebURLToKURL(script_url),
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 namespace WebKit { 258 namespace WebKit {
259 259
260 WebWorker* WebWorker::create(WebWorkerClient* client) { 260 WebWorker* WebWorker::create(WebWorkerClient* client) {
261 return NULL; 261 return NULL;
262 } 262 }
263 263
264 } 264 }
265 265
266 #endif 266 #endif
OLDNEW
« no previous file with comments | « chrome/worker/worker_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698