OLD | NEW |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 registry->unregisterURL(url); | 86 registry->unregisterURL(url); |
87 urlsToRemove.append(registeredUrl.key); | 87 urlsToRemove.append(registeredUrl.key); |
88 } | 88 } |
89 } | 89 } |
90 for (unsigned j = 0; j < urlsToRemove.size(); j++) | 90 for (unsigned j = 0; j < urlsToRemove.size(); j++) |
91 registeredURLs.remove(urlsToRemove[j]); | 91 registeredURLs.remove(urlsToRemove[j]); |
92 urlsToRemove.clear(); | 92 urlsToRemove.clear(); |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 void PublicURLManager::stop() { | 96 void PublicURLManager::contextDestroyed() { |
97 if (m_isStopped) | 97 if (m_isStopped) |
98 return; | 98 return; |
99 | 99 |
100 m_isStopped = true; | 100 m_isStopped = true; |
101 for (auto& registryUrl : m_registryToURL) { | 101 for (auto& registryUrl : m_registryToURL) { |
102 for (auto& url : registryUrl.value) | 102 for (auto& url : registryUrl.value) |
103 registryUrl.key->unregisterURL(KURL(ParsedURLString, url.key)); | 103 registryUrl.key->unregisterURL(KURL(ParsedURLString, url.key)); |
104 } | 104 } |
105 | 105 |
106 m_registryToURL.clear(); | 106 m_registryToURL.clear(); |
107 } | 107 } |
108 | 108 |
109 DEFINE_TRACE(PublicURLManager) { | 109 DEFINE_TRACE(PublicURLManager) { |
110 ActiveDOMObject::trace(visitor); | 110 ActiveDOMObject::trace(visitor); |
111 } | 111 } |
112 | 112 |
113 } // namespace blink | 113 } // namespace blink |
OLD | NEW |