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

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

Issue 625943002: Catch uncaught promise rejections from V8 and log to console. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 2 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
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, 2011 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009, 2011 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 return; 258 return;
259 } 259 }
260 } 260 }
261 } 261 }
262 262
263 EventTarget* WorkerGlobalScope::errorEventTarget() 263 EventTarget* WorkerGlobalScope::errorEventTarget()
264 { 264 {
265 return this; 265 return this;
266 } 266 }
267 267
268 void WorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int, c onst String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr <ScriptCallStack>) 268 void WorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int, c onst String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr <ScriptCallStack>, PassRefPtrWillBeRawPtr<ScriptArguments>)
269 { 269 {
270 thread()->workerReportingProxy().reportException(errorMessage, lineNumber, c olumnNumber, sourceURL); 270 thread()->workerReportingProxy().reportException(errorMessage, lineNumber, c olumnNumber, sourceURL);
271 } 271 }
272 272
273 void WorkerGlobalScope::reportBlockedScriptExecutionToInspector(const String& di rectiveText) 273 void WorkerGlobalScope::reportBlockedScriptExecutionToInspector(const String& di rectiveText)
274 { 274 {
275 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); 275 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText);
276 } 276 }
277 277
278 void WorkerGlobalScope::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> prpConsoleMessage) 278 void WorkerGlobalScope::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> prpConsoleMessage)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 visitor->trace(m_eventQueue); 337 visitor->trace(m_eventQueue);
338 visitor->trace(m_workerClients); 338 visitor->trace(m_workerClients);
339 visitor->trace(m_messageStorage); 339 visitor->trace(m_messageStorage);
340 HeapSupplementable<WorkerGlobalScope>::trace(visitor); 340 HeapSupplementable<WorkerGlobalScope>::trace(visitor);
341 #endif 341 #endif
342 ExecutionContext::trace(visitor); 342 ExecutionContext::trace(visitor);
343 EventTargetWithInlineData::trace(visitor); 343 EventTargetWithInlineData::trace(visitor);
344 } 344 }
345 345
346 } // namespace blink 346 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698