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

Side by Side Diff: third_party/WebKit/Source/core/html/PublicURLManager.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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) 2012 Motorola Mobility Inc. 2 * Copyright (C) 2012 Motorola Mobility Inc.
3 * Copyright (C) 2013 Google Inc. All Rights Reserved. 3 * Copyright (C) 2013 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 registry->unregisterURL(url); 84 registry->unregisterURL(url);
85 urlsToRemove.push_back(registeredUrl.key); 85 urlsToRemove.push_back(registeredUrl.key);
86 } 86 }
87 } 87 }
88 for (const auto& url : urlsToRemove) 88 for (const auto& url : urlsToRemove)
89 registeredURLs.remove(url); 89 registeredURLs.remove(url);
90 urlsToRemove.clear(); 90 urlsToRemove.clear();
91 } 91 }
92 } 92 }
93 93
94 void PublicURLManager::contextDestroyed() { 94 void PublicURLManager::contextDestroyed(ExecutionContext*) {
95 if (m_isStopped) 95 if (m_isStopped)
96 return; 96 return;
97 97
98 m_isStopped = true; 98 m_isStopped = true;
99 for (auto& registryUrl : m_registryToURL) { 99 for (auto& registryUrl : m_registryToURL) {
100 for (auto& url : registryUrl.value) 100 for (auto& url : registryUrl.value)
101 registryUrl.key->unregisterURL(KURL(ParsedURLString, url.key)); 101 registryUrl.key->unregisterURL(KURL(ParsedURLString, url.key));
102 } 102 }
103 103
104 m_registryToURL.clear(); 104 m_registryToURL.clear();
105 } 105 }
106 106
107 DEFINE_TRACE(PublicURLManager) { 107 DEFINE_TRACE(PublicURLManager) {
108 ContextLifecycleObserver::trace(visitor); 108 ContextLifecycleObserver::trace(visitor);
109 } 109 }
110 110
111 } // namespace blink 111 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/PublicURLManager.h ('k') | third_party/WebKit/Source/core/loader/PrerenderHandle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698