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 27 matching lines...) Expand all Loading... |
38 #include "core/fetch/ResourceLoaderOptions.h" | 38 #include "core/fetch/ResourceLoaderOptions.h" |
39 #include "core/inspector/ConsoleMessage.h" | 39 #include "core/inspector/ConsoleMessage.h" |
40 #include "core/inspector/ScriptCallStack.h" | 40 #include "core/inspector/ScriptCallStack.h" |
41 #include "core/inspector/WorkerInspectorController.h" | 41 #include "core/inspector/WorkerInspectorController.h" |
42 #include "core/loader/ThreadableLoader.h" | 42 #include "core/loader/ThreadableLoader.h" |
43 #include "core/workers/WorkerClients.h" | 43 #include "core/workers/WorkerClients.h" |
44 #include "core/workers/WorkerThreadStartupData.h" | 44 #include "core/workers/WorkerThreadStartupData.h" |
45 #include "modules/EventTargetModules.h" | 45 #include "modules/EventTargetModules.h" |
46 #include "modules/fetch/GlobalFetch.h" | 46 #include "modules/fetch/GlobalFetch.h" |
47 #include "modules/serviceworkers/CacheStorage.h" | 47 #include "modules/serviceworkers/CacheStorage.h" |
48 #include "modules/serviceworkers/InspectorServiceWorkerCacheAgent.h" | |
49 #include "modules/serviceworkers/ServiceWorkerClients.h" | 48 #include "modules/serviceworkers/ServiceWorkerClients.h" |
50 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" | 49 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" |
51 #include "modules/serviceworkers/ServiceWorkerRegistration.h" | 50 #include "modules/serviceworkers/ServiceWorkerRegistration.h" |
52 #include "modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h" | 51 #include "modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h" |
53 #include "modules/serviceworkers/ServiceWorkerThread.h" | 52 #include "modules/serviceworkers/ServiceWorkerThread.h" |
54 #include "modules/serviceworkers/WaitUntilObserver.h" | 53 #include "modules/serviceworkers/WaitUntilObserver.h" |
55 #include "platform/network/ResourceRequest.h" | 54 #include "platform/network/ResourceRequest.h" |
56 #include "platform/weborigin/DatabaseIdentifier.h" | 55 #include "platform/weborigin/DatabaseIdentifier.h" |
57 #include "platform/weborigin/KURL.h" | 56 #include "platform/weborigin/KURL.h" |
58 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" | 57 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" |
(...skipping 29 matching lines...) Expand all Loading... |
88 | 87 |
89 return context.release(); | 88 return context.release(); |
90 } | 89 } |
91 | 90 |
92 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String
& userAgent, ServiceWorkerThread* thread, double timeOrigin, const SecurityOrigi
n* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) | 91 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String
& userAgent, ServiceWorkerThread* thread, double timeOrigin, const SecurityOrigi
n* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) |
93 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke
rClients) | 92 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke
rClients) |
94 , m_didEvaluateScript(false) | 93 , m_didEvaluateScript(false) |
95 , m_hadErrorInTopLevelEventHandler(false) | 94 , m_hadErrorInTopLevelEventHandler(false) |
96 , m_eventNestingLevel(0) | 95 , m_eventNestingLevel(0) |
97 { | 96 { |
98 workerInspectorController()->registerModuleAgent(InspectorServiceWorkerCache
Agent::create(this)); | |
99 } | 97 } |
100 | 98 |
101 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() | 99 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() |
102 { | 100 { |
103 } | 101 } |
104 | 102 |
105 void ServiceWorkerGlobalScope::didEvaluateWorkerScript() | 103 void ServiceWorkerGlobalScope::didEvaluateWorkerScript() |
106 { | 104 { |
107 m_didEvaluateScript = true; | 105 m_didEvaluateScript = true; |
108 } | 106 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage,
int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe
fPtrWillBeRawPtr<ScriptCallStack> callStack) | 227 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage,
int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe
fPtrWillBeRawPtr<ScriptCallStack> callStack) |
230 { | 228 { |
231 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL,
lineNumber, columnNumber, callStack); | 229 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL,
lineNumber, columnNumber, callStack); |
232 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J
SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); | 230 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J
SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); |
233 consoleMessage->setScriptId(scriptId); | 231 consoleMessage->setScriptId(scriptId); |
234 consoleMessage->setCallStack(callStack); | 232 consoleMessage->setCallStack(callStack); |
235 addMessageToWorkerConsole(consoleMessage.release()); | 233 addMessageToWorkerConsole(consoleMessage.release()); |
236 } | 234 } |
237 | 235 |
238 } // namespace blink | 236 } // namespace blink |
OLD | NEW |