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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 ->skipWaiting( | 170 ->skipWaiting( |
171 WTF::makeUnique<CallbackPromiseAdapter<void, void>>(resolver)); | 171 WTF::makeUnique<CallbackPromiseAdapter<void, void>>(resolver)); |
172 return promise; | 172 return promise; |
173 } | 173 } |
174 | 174 |
175 void ServiceWorkerGlobalScope::setRegistration( | 175 void ServiceWorkerGlobalScope::setRegistration( |
176 std::unique_ptr<WebServiceWorkerRegistration::Handle> handle) { | 176 std::unique_ptr<WebServiceWorkerRegistration::Handle> handle) { |
177 if (!getExecutionContext()) | 177 if (!getExecutionContext()) |
178 return; | 178 return; |
179 m_registration = ServiceWorkerRegistration::getOrCreate( | 179 m_registration = ServiceWorkerRegistration::getOrCreate( |
180 getExecutionContext(), wrapUnique(handle.release())); | 180 getExecutionContext(), WTF::wrapUnique(handle.release())); |
181 } | 181 } |
182 | 182 |
183 bool ServiceWorkerGlobalScope::addEventListenerInternal( | 183 bool ServiceWorkerGlobalScope::addEventListenerInternal( |
184 const AtomicString& eventType, | 184 const AtomicString& eventType, |
185 EventListener* listener, | 185 EventListener* listener, |
186 const AddEventListenerOptionsResolved& options) { | 186 const AddEventListenerOptionsResolved& options) { |
187 if (m_didEvaluateScript) { | 187 if (m_didEvaluateScript) { |
188 String message = String::format( | 188 String message = String::format( |
189 "Event handler of '%s' event must be added on the initial evaluation " | 189 "Event handler of '%s' event must be added on the initial evaluation " |
190 "of worker script.", | 190 "of worker script.", |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 } | 254 } |
255 | 255 |
256 void ServiceWorkerGlobalScope::exceptionThrown(ErrorEvent* event) { | 256 void ServiceWorkerGlobalScope::exceptionThrown(ErrorEvent* event) { |
257 WorkerGlobalScope::exceptionThrown(event); | 257 WorkerGlobalScope::exceptionThrown(event); |
258 if (WorkerThreadDebugger* debugger = | 258 if (WorkerThreadDebugger* debugger = |
259 WorkerThreadDebugger::from(thread()->isolate())) | 259 WorkerThreadDebugger::from(thread()->isolate())) |
260 debugger->exceptionThrown(thread(), event); | 260 debugger->exceptionThrown(thread(), event); |
261 } | 261 } |
262 | 262 |
263 } // namespace blink | 263 } // namespace blink |
OLD | NEW |