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

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

Issue 559553002: Merge ExecutionContextClient and ExecutionContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@tmp1
Patch Set: Rebased 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/testing/NullExecutionContext.cpp ('k') | Source/core/workers/WorkerGlobalScope.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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 WorkerConsole::~WorkerConsole() 48 WorkerConsole::~WorkerConsole()
49 { 49 {
50 } 50 }
51 51
52 void WorkerConsole::reportMessageToConsole(PassRefPtrWillBeRawPtr<ConsoleMessage > consoleMessage) 52 void WorkerConsole::reportMessageToConsole(PassRefPtrWillBeRawPtr<ConsoleMessage > consoleMessage)
53 { 53 {
54 const ScriptCallFrame& lastCaller = consoleMessage->callStack()->at(0); 54 const ScriptCallFrame& lastCaller = consoleMessage->callStack()->at(0);
55 consoleMessage->setURL(lastCaller.sourceURL()); 55 consoleMessage->setURL(lastCaller.sourceURL());
56 consoleMessage->setLineNumber(lastCaller.lineNumber()); 56 consoleMessage->setLineNumber(lastCaller.lineNumber());
57 m_scope->addMessage(consoleMessage); 57 m_scope->addConsoleMessage(consoleMessage);
58 } 58 }
59 59
60 ExecutionContext* WorkerConsole::context() 60 ExecutionContext* WorkerConsole::context()
61 { 61 {
62 if (!m_scope) 62 if (!m_scope)
63 return 0; 63 return 0;
64 return m_scope->executionContext(); 64 return m_scope->executionContext();
65 } 65 }
66 66
67 void WorkerConsole::trace(Visitor* visitor) 67 void WorkerConsole::trace(Visitor* visitor)
68 { 68 {
69 visitor->trace(m_scope); 69 visitor->trace(m_scope);
70 ConsoleBase::trace(visitor); 70 ConsoleBase::trace(visitor);
71 } 71 }
72 72
73 // FIXME: add memory getter 73 // FIXME: add memory getter
74 74
75 } // namespace blink 75 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/testing/NullExecutionContext.cpp ('k') | Source/core/workers/WorkerGlobalScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698