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

Side by Side Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference Created 3 years, 10 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl() { 107 WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl() {
108 // Prevent onScriptLoaderFinished from deleting 'this'. 108 // Prevent onScriptLoaderFinished from deleting 'this'.
109 m_askedToTerminate = true; 109 m_askedToTerminate = true;
110 110
111 if (m_workerThread) 111 if (m_workerThread)
112 m_workerThread->terminateAndWait(); 112 m_workerThread->terminateAndWait();
113 113
114 DCHECK(runningWorkerInstances().contains(this)); 114 DCHECK(runningWorkerInstances().contains(this));
115 runningWorkerInstances().remove(this); 115 runningWorkerInstances().erase(this);
116 DCHECK(m_webView); 116 DCHECK(m_webView);
117 117
118 // Detach the client before closing the view to avoid getting called back. 118 // Detach the client before closing the view to avoid getting called back.
119 m_mainFrame->setClient(0); 119 m_mainFrame->setClient(0);
120 120
121 if (m_workerGlobalScopeProxy) { 121 if (m_workerGlobalScopeProxy) {
122 m_workerGlobalScopeProxy->detach(); 122 m_workerGlobalScopeProxy->detach();
123 m_workerGlobalScopeProxy.clear(); 123 m_workerGlobalScopeProxy.clear();
124 } 124 }
125 125
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 *this, *document, *m_workerContextClient); 475 *this, *document, *m_workerContextClient);
476 m_loaderProxy = WorkerLoaderProxy::create(this); 476 m_loaderProxy = WorkerLoaderProxy::create(this);
477 m_workerThread = ServiceWorkerThread::create( 477 m_workerThread = ServiceWorkerThread::create(
478 m_loaderProxy, *m_workerGlobalScopeProxy, m_mainThreadTaskRunners.get()); 478 m_loaderProxy, *m_workerGlobalScopeProxy, m_mainThreadTaskRunners.get());
479 m_workerThread->start(std::move(startupData)); 479 m_workerThread->start(std::move(startupData));
480 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), 480 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
481 scriptURL); 481 scriptURL);
482 } 482 }
483 483
484 } // namespace blink 484 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/OpenedFrameTracker.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698