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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 930213002: Report V8 execution termination in a worker as an error. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: sync Created 5 years, 10 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
« no previous file with comments | « Source/bindings/core/v8/WorkerScriptController.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return result; 185 return result;
186 } 186 }
187 187
188 void ServiceWorkerGlobalScope::dispatchExtendableEvent(PassRefPtrWillBeRawPtr<Ev ent> event, WaitUntilObserver* observer) 188 void ServiceWorkerGlobalScope::dispatchExtendableEvent(PassRefPtrWillBeRawPtr<Ev ent> event, WaitUntilObserver* observer)
189 { 189 {
190 ASSERT(m_eventNestingLevel == 0); 190 ASSERT(m_eventNestingLevel == 0);
191 m_hadErrorInTopLevelEventHandler = false; 191 m_hadErrorInTopLevelEventHandler = false;
192 192
193 observer->willDispatchEvent(); 193 observer->willDispatchEvent();
194 dispatchEvent(event); 194 dispatchEvent(event);
195 if (thread()->terminated())
196 m_hadErrorInTopLevelEventHandler = true;
195 observer->didDispatchEvent(m_hadErrorInTopLevelEventHandler); 197 observer->didDispatchEvent(m_hadErrorInTopLevelEventHandler);
196 } 198 }
197 199
198 DEFINE_TRACE(ServiceWorkerGlobalScope) 200 DEFINE_TRACE(ServiceWorkerGlobalScope)
199 { 201 {
200 visitor->trace(m_clients); 202 visitor->trace(m_clients);
201 visitor->trace(m_registration); 203 visitor->trace(m_registration);
202 visitor->trace(m_caches); 204 visitor->trace(m_caches);
203 WorkerGlobalScope::trace(visitor); 205 WorkerGlobalScope::trace(visitor);
204 } 206 }
(...skipping 16 matching lines...) Expand all
221 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe fPtrWillBeRawPtr<ScriptCallStack> callStack) 223 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe fPtrWillBeRawPtr<ScriptCallStack> callStack)
222 { 224 {
223 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL, lineNumber, columnNumber, callStack); 225 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL, lineNumber, columnNumber, callStack);
224 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); 226 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber);
225 consoleMessage->setScriptId(scriptId); 227 consoleMessage->setScriptId(scriptId);
226 consoleMessage->setCallStack(callStack); 228 consoleMessage->setCallStack(callStack);
227 addMessageToWorkerConsole(consoleMessage.release()); 229 addMessageToWorkerConsole(consoleMessage.release());
228 } 230 }
229 231
230 } // namespace blink 232 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/WorkerScriptController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698