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

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

Issue 464293002: [DevTools] ConsoleMessage storage moved from ConsoleAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@remove-can-generate
Patch Set: Created 6 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/WorkerGlobalScope.cpp ('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 /* 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (m_askedToTerminate) 183 if (m_askedToTerminate)
184 return; 184 return;
185 // FIXME: In case of nested workers, this should go directly to the root Doc ument context. 185 // FIXME: In case of nested workers, this should go directly to the root Doc ument context.
186 ASSERT(m_executionContext->isDocument()); 186 ASSERT(m_executionContext->isDocument());
187 Document* document = toDocument(m_executionContext.get()); 187 Document* document = toDocument(m_executionContext.get());
188 LocalFrame* frame = document->frame(); 188 LocalFrame* frame = document->frame();
189 if (!frame) 189 if (!frame)
190 return; 190 return;
191 191
192 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(s ource, level, message, sourceURL, lineNumber); 192 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(s ource, level, message, sourceURL, lineNumber);
193 consoleMessage->setWorkerId(this); 193 consoleMessage->setWorkerGlobalScopeProxy(this);
194 frame->console().addMessage(consoleMessage.release()); 194 frame->console().addMessage(consoleMessage.release());
195 } 195 }
196 196
197 void WorkerMessagingProxy::workerThreadCreated(PassRefPtr<DedicatedWorkerThread> workerThread) 197 void WorkerMessagingProxy::workerThreadCreated(PassRefPtr<DedicatedWorkerThread> workerThread)
198 { 198 {
199 ASSERT(!m_askedToTerminate); 199 ASSERT(!m_askedToTerminate);
200 m_workerThread = workerThread; 200 m_workerThread = workerThread;
201 201
202 unsigned taskCount = m_queuedEarlyTasks.size(); 202 unsigned taskCount = m_queuedEarlyTasks.size();
203 ASSERT(!m_unconfirmedMessageCount); 203 ASSERT(!m_unconfirmedMessageCount);
(...skipping 82 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().adoptWorkerConsoleMessages(this); 292 frame->console().adoptWorkerConsoleMessages(this);
293 } 293 }
294 294
295 } // namespace blink 295 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698