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

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

Issue 1253293002: Oilpan: Remove raw pointer to ExecutionContext from WorkerInspectorProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/workers/WorkerMessagingProxy.h ('k') | Source/web/WebEmbeddedWorkerImpl.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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 m_workerInspectorProxy->setWorkerGlobalScopeProxy(this); 89 m_workerInspectorProxy->setWorkerGlobalScopeProxy(this);
90 } 90 }
91 91
92 WorkerMessagingProxy::~WorkerMessagingProxy() 92 WorkerMessagingProxy::~WorkerMessagingProxy()
93 { 93 {
94 ASSERT(!m_workerObject); 94 ASSERT(!m_workerObject);
95 ASSERT((m_executionContext->isDocument() && isMainThread()) 95 ASSERT((m_executionContext->isDocument() && isMainThread())
96 || (m_executionContext->isWorkerGlobalScope() && toWorkerGlobalScope(m_e xecutionContext.get())->thread()->isCurrentThread())); 96 || (m_executionContext->isWorkerGlobalScope() && toWorkerGlobalScope(m_e xecutionContext.get())->thread()->isCurrentThread()));
97 if (m_loaderProxy) 97 if (m_loaderProxy)
98 m_loaderProxy->detachProvider(this); 98 m_loaderProxy->detachProvider(this);
99 m_workerInspectorProxy->setWorkerGlobalScopeProxy(nullptr);
99 } 100 }
100 101
101 void WorkerMessagingProxy::startWorkerGlobalScope(const KURL& scriptURL, const S tring& userAgent, const String& sourceCode, WorkerThreadStartMode startMode) 102 void WorkerMessagingProxy::startWorkerGlobalScope(const KURL& scriptURL, const S tring& userAgent, const String& sourceCode, WorkerThreadStartMode startMode)
102 { 103 {
103 // FIXME: This need to be revisited when we support nested worker one day 104 // FIXME: This need to be revisited when we support nested worker one day
104 ASSERT(m_executionContext->isDocument()); 105 ASSERT(m_executionContext->isDocument());
105 if (m_askedToTerminate) { 106 if (m_askedToTerminate) {
106 // Worker.terminate() could be called from JS before the thread was crea ted. 107 // Worker.terminate() could be called from JS before the thread was crea ted.
107 return; 108 return;
108 } 109 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 296
296 // FIXME: This need to be revisited when we support nested worker one day 297 // FIXME: This need to be revisited when we support nested worker one day
297 ASSERT(m_executionContext->isDocument()); 298 ASSERT(m_executionContext->isDocument());
298 Document* document = toDocument(m_executionContext.get()); 299 Document* document = toDocument(m_executionContext.get());
299 LocalFrame* frame = document->frame(); 300 LocalFrame* frame = document->frame();
300 if (frame) 301 if (frame)
301 frame->console().adoptWorkerMessagesAfterTermination(this); 302 frame->console().adoptWorkerMessagesAfterTermination(this);
302 } 303 }
303 304
304 } // namespace blink 305 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerMessagingProxy.h ('k') | Source/web/WebEmbeddedWorkerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698