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

Side by Side Diff: Source/core/workers/WorkerMessagingProxy.cpp

Issue 1175233004: WorkerThread: drop unnecessary interfaces to simplify (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review #5 Created 5 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 | « no previous file | Source/core/workers/WorkerThread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 delete this; 226 delete this;
227 } 227 }
228 228
229 void WorkerMessagingProxy::terminateWorkerGlobalScope() 229 void WorkerMessagingProxy::terminateWorkerGlobalScope()
230 { 230 {
231 if (m_askedToTerminate) 231 if (m_askedToTerminate)
232 return; 232 return;
233 m_askedToTerminate = true; 233 m_askedToTerminate = true;
234 234
235 if (m_workerThread) 235 if (m_workerThread)
236 m_workerThread->stop(); 236 m_workerThread->terminate();
237 237
238 terminateInternally(); 238 terminateInternally();
239 } 239 }
240 240
241 void WorkerMessagingProxy::postMessageToPageInspector(const String& message) 241 void WorkerMessagingProxy::postMessageToPageInspector(const String& message)
242 { 242 {
243 if (!m_workerInspectorProxy) 243 if (!m_workerInspectorProxy)
244 return; 244 return;
245 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy- >pageInspector(); 245 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy- >pageInspector();
246 if (pageInspector) 246 if (pageInspector)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 // FIXME: This need to be revisited when we support nested worker one day 287 // FIXME: This need to be revisited when we support nested worker one day
288 ASSERT(m_executionContext->isDocument()); 288 ASSERT(m_executionContext->isDocument());
289 Document* document = toDocument(m_executionContext.get()); 289 Document* document = toDocument(m_executionContext.get());
290 LocalFrame* frame = document->frame(); 290 LocalFrame* frame = document->frame();
291 if (frame) 291 if (frame)
292 frame->console().adoptWorkerMessagesAfterTermination(this); 292 frame->console().adoptWorkerMessagesAfterTermination(this);
293 } 293 }
294 294
295 } // namespace blink 295 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698