Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 2387983002: Worker: Reflow comments in worker components (Closed)
Patch Set: manually tweak Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 m_clients = ServiceWorkerClients::create(); 152 m_clients = ServiceWorkerClients::create();
153 return m_clients; 153 return m_clients;
154 } 154 }
155 155
156 ServiceWorkerRegistration* ServiceWorkerGlobalScope::registration() { 156 ServiceWorkerRegistration* ServiceWorkerGlobalScope::registration() {
157 return m_registration; 157 return m_registration;
158 } 158 }
159 159
160 ScriptPromise ServiceWorkerGlobalScope::skipWaiting(ScriptState* scriptState) { 160 ScriptPromise ServiceWorkerGlobalScope::skipWaiting(ScriptState* scriptState) {
161 ExecutionContext* executionContext = scriptState->getExecutionContext(); 161 ExecutionContext* executionContext = scriptState->getExecutionContext();
162 // FIXME: short-term fix, see details at: https://codereview.chromium.org/5351 93002/. 162 // FIXME: short-term fix, see details at:
163 // https://codereview.chromium.org/535193002/.
163 if (!executionContext) 164 if (!executionContext)
164 return ScriptPromise(); 165 return ScriptPromise();
165 166
166 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); 167 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
167 ScriptPromise promise = resolver->promise(); 168 ScriptPromise promise = resolver->promise();
168 169
169 ServiceWorkerGlobalScopeClient::from(executionContext) 170 ServiceWorkerGlobalScopeClient::from(executionContext)
170 ->skipWaiting(new CallbackPromiseAdapter<void, void>(resolver)); 171 ->skipWaiting(new CallbackPromiseAdapter<void, void>(resolver));
171 return promise; 172 return promise;
172 } 173 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 254 }
254 255
255 void ServiceWorkerGlobalScope::exceptionThrown(ErrorEvent* event) { 256 void ServiceWorkerGlobalScope::exceptionThrown(ErrorEvent* event) {
256 WorkerGlobalScope::exceptionThrown(event); 257 WorkerGlobalScope::exceptionThrown(event);
257 if (WorkerThreadDebugger* debugger = 258 if (WorkerThreadDebugger* debugger =
258 WorkerThreadDebugger::from(thread()->isolate())) 259 WorkerThreadDebugger::from(thread()->isolate()))
259 debugger->exceptionThrown(event); 260 debugger->exceptionThrown(event);
260 } 261 }
261 262
262 } // namespace blink 263 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698