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

Side by Side Diff: Source/modules/serviceworkers/FetchManager.cpp

Issue 692443002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "FetchManager.h" 6 #include "FetchManager.h"
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 void FetchManager::Loader::failed() 323 void FetchManager::Loader::failed()
324 { 324 {
325 if (m_failed) 325 if (m_failed)
326 return; 326 return;
327 if (!m_resolver->executionContext() || m_resolver->executionContext()->activ eDOMObjectsAreStopped()) 327 if (!m_resolver->executionContext() || m_resolver->executionContext()->activ eDOMObjectsAreStopped())
328 return; 328 return;
329 m_failed = true; 329 m_failed = true;
330 ScriptState* state = m_resolver->scriptState(); 330 ScriptState* state = m_resolver->scriptState();
331 ScriptState::Scope scope(state); 331 ScriptState::Scope scope(state);
332 m_resolver->reject(V8ThrowException::createTypeError("Failed to fetch", stat e->isolate())); 332 m_resolver->reject(V8ThrowException::createTypeError(state->isolate(), "Fail ed to fetch"));
333 notifyFinished(); 333 notifyFinished();
334 } 334 }
335 335
336 void FetchManager::Loader::notifyFinished() 336 void FetchManager::Loader::notifyFinished()
337 { 337 {
338 if (m_fetchManager) 338 if (m_fetchManager)
339 m_fetchManager->onLoaderFinished(this); 339 m_fetchManager->onLoaderFinished(this);
340 } 340 }
341 341
342 FetchManager::FetchManager(ExecutionContext* executionContext) 342 FetchManager::FetchManager(ExecutionContext* executionContext)
(...skipping 18 matching lines...) Expand all
361 loader->start(); 361 loader->start();
362 return promise; 362 return promise;
363 } 363 }
364 364
365 void FetchManager::onLoaderFinished(Loader* loader) 365 void FetchManager::onLoaderFinished(Loader* loader)
366 { 366 {
367 m_loaders.remove(loader); 367 m_loaders.remove(loader);
368 } 368 }
369 369
370 } // namespace blink 370 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/Cache.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698