| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 return dispatchResult; | 179 return dispatchResult; |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ServiceWorkerGlobalScope::dispatchExtendableEvent(Event* event, WaitUntilOb
server* observer) | 182 void ServiceWorkerGlobalScope::dispatchExtendableEvent(Event* event, WaitUntilOb
server* observer) |
| 183 { | 183 { |
| 184 ASSERT(m_eventNestingLevel == 0); | 184 ASSERT(m_eventNestingLevel == 0); |
| 185 m_hadErrorInTopLevelEventHandler = false; | 185 m_hadErrorInTopLevelEventHandler = false; |
| 186 | 186 |
| 187 observer->willDispatchEvent(); | 187 observer->willDispatchEvent(); |
| 188 dispatchEvent(event); | 188 dispatchEvent(event); |
| 189 if (thread()->terminated()) | 189 |
| 190 // Check if the worker thread is forcibly terminated during the event |
| 191 // because of timeout etc. |
| 192 if (thread()->isForciblyTerminated()) |
| 190 m_hadErrorInTopLevelEventHandler = true; | 193 m_hadErrorInTopLevelEventHandler = true; |
| 194 |
| 191 observer->didDispatchEvent(m_hadErrorInTopLevelEventHandler); | 195 observer->didDispatchEvent(m_hadErrorInTopLevelEventHandler); |
| 192 } | 196 } |
| 193 | 197 |
| 194 DEFINE_TRACE(ServiceWorkerGlobalScope) | 198 DEFINE_TRACE(ServiceWorkerGlobalScope) |
| 195 { | 199 { |
| 196 visitor->trace(m_clients); | 200 visitor->trace(m_clients); |
| 197 visitor->trace(m_registration); | 201 visitor->trace(m_registration); |
| 198 WorkerGlobalScope::trace(visitor); | 202 WorkerGlobalScope::trace(visitor); |
| 199 } | 203 } |
| 200 | 204 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 221 } | 225 } |
| 222 | 226 |
| 223 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta
dataSize) | 227 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta
dataSize) |
| 224 { | 228 { |
| 225 ++m_scriptCount; | 229 ++m_scriptCount; |
| 226 m_scriptTotalSize += scriptSize; | 230 m_scriptTotalSize += scriptSize; |
| 227 m_scriptCachedMetadataTotalSize += cachedMetadataSize; | 231 m_scriptCachedMetadataTotalSize += cachedMetadataSize; |
| 228 } | 232 } |
| 229 | 233 |
| 230 } // namespace blink | 234 } // namespace blink |
| OLD | NEW |