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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp

Issue 1998353003: Reduce ConsoleMessage API surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1999463002
Patch Set: rebased Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "bindings/core/v8/RejectedPromises.h" 5 #include "bindings/core/v8/RejectedPromises.h"
6 6
7 #include "bindings/core/v8/ScopedPersistent.h" 7 #include "bindings/core/v8/ScopedPersistent.h"
8 #include "bindings/core/v8/ScriptCallStack.h" 8 #include "bindings/core/v8/ScriptCallStack.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ScriptValue.h" 10 #include "bindings/core/v8/ScriptValue.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 args.append(ScriptValue(m_scriptState, v8String(m_scriptState->isola te(), errorMessage))); 79 args.append(ScriptValue(m_scriptState, v8String(m_scriptState->isola te(), errorMessage)));
80 args.append(ScriptValue(m_scriptState, reason)); 80 args.append(ScriptValue(m_scriptState, reason));
81 ScriptArguments* arguments = ScriptArguments::create(m_scriptState, args); 81 ScriptArguments* arguments = ScriptArguments::create(m_scriptState, args);
82 82
83 String embedderErrorMessage = m_errorMessage; 83 String embedderErrorMessage = m_errorMessage;
84 if (embedderErrorMessage.isEmpty()) 84 if (embedderErrorMessage.isEmpty())
85 embedderErrorMessage = errorMessage; 85 embedderErrorMessage = errorMessage;
86 else if (embedderErrorMessage.startsWith("Uncaught ")) 86 else if (embedderErrorMessage.startsWith("Uncaught "))
87 embedderErrorMessage.insert(" (in promise)", 8); 87 embedderErrorMessage.insert(" (in promise)", 8);
88 88
89 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSou rce, ErrorMessageLevel, embedderErrorMessage, m_resourceName, m_lineNumber, m_co lumnNumber, m_callStack, m_scriptId); 89 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSou rce, ErrorMessageLevel, embedderErrorMessage, m_resourceName, m_lineNumber, m_co lumnNumber, m_callStack, m_scriptId, arguments);
90 consoleMessage->setScriptArguments(arguments);
91 m_consoleMessageId = consoleMessage->assignMessageId(); 90 m_consoleMessageId = consoleMessage->assignMessageId();
92 executionContext->addConsoleMessage(consoleMessage); 91 executionContext->addConsoleMessage(consoleMessage);
93 } 92 }
94 93
95 m_callStack.clear(); 94 m_callStack.clear();
96 } 95 }
97 96
98 void revoke() 97 void revoke()
99 { 98 {
100 ExecutionContext* executionContext = m_scriptState->getExecutionContext( ); 99 ExecutionContext* executionContext = m_scriptState->getExecutionContext( );
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 272 }
274 } 273 }
275 } 274 }
276 275
277 void RejectedPromises::revokeNow(PassOwnPtr<Message> message) 276 void RejectedPromises::revokeNow(PassOwnPtr<Message> message)
278 { 277 {
279 message->revoke(); 278 message->revoke();
280 } 279 }
281 280
282 } // namespace blink 281 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698