| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 73 } |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver; | 76 RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 PassRefPtrWillBeRawPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::creat
e(ServiceWorkerThread* thread, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> s
tartupData) | 79 PassRefPtrWillBeRawPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::creat
e(ServiceWorkerThread* thread, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> s
tartupData) |
| 80 { | 80 { |
| 81 RefPtrWillBeRawPtr<ServiceWorkerGlobalScope> context = adoptRefWillBeNoop(ne
w ServiceWorkerGlobalScope(startupData->m_scriptURL, startupData->m_userAgent, t
hread, monotonicallyIncreasingTime(), startupData->m_starterOrigin, startupData-
>m_workerClients.release())); | 81 RefPtrWillBeRawPtr<ServiceWorkerGlobalScope> context = adoptRefWillBeNoop(ne
w ServiceWorkerGlobalScope(startupData->m_scriptURL, startupData->m_userAgent, t
hread, monotonicallyIncreasingTime(), startupData->m_starterOrigin, startupData-
>m_workerClients.release())); |
| 82 | 82 |
| 83 context->setV8CacheOptions(startupData->m_v8CacheOptions); |
| 83 context->applyContentSecurityPolicyFromString(startupData->m_contentSecurity
Policy, startupData->m_contentSecurityPolicyType); | 84 context->applyContentSecurityPolicyFromString(startupData->m_contentSecurity
Policy, startupData->m_contentSecurityPolicyType); |
| 84 | 85 |
| 85 return context.release(); | 86 return context.release(); |
| 86 } | 87 } |
| 87 | 88 |
| 88 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String
& userAgent, ServiceWorkerThread* thread, double timeOrigin, const SecurityOrigi
n* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) | 89 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String
& userAgent, ServiceWorkerThread* thread, double timeOrigin, const SecurityOrigi
n* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) |
| 89 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke
rClients) | 90 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke
rClients) |
| 90 , m_didEvaluateScript(false) | 91 , m_didEvaluateScript(false) |
| 91 , m_hadErrorInTopLevelEventHandler(false) | 92 , m_hadErrorInTopLevelEventHandler(false) |
| 92 , m_eventNestingLevel(0) | 93 , m_eventNestingLevel(0) |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage,
int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe
fPtrWillBeRawPtr<ScriptCallStack> callStack) | 221 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage,
int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe
fPtrWillBeRawPtr<ScriptCallStack> callStack) |
| 221 { | 222 { |
| 222 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL,
lineNumber, columnNumber, callStack); | 223 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL,
lineNumber, columnNumber, callStack); |
| 223 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J
SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); | 224 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J
SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); |
| 224 consoleMessage->setScriptId(scriptId); | 225 consoleMessage->setScriptId(scriptId); |
| 225 consoleMessage->setCallStack(callStack); | 226 consoleMessage->setCallStack(callStack); |
| 226 addMessageToWorkerConsole(consoleMessage.release()); | 227 addMessageToWorkerConsole(consoleMessage.release()); |
| 227 } | 228 } |
| 228 | 229 |
| 229 } // namespace blink | 230 } // namespace blink |
| OLD | NEW |