OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |