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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2694283003: Annotate ScriptWrappable-embedding singletons.
Patch Set: add XPathValue singleton 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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 FrameLoaderClient::SuddenTerminationDisablerType disablerType) { 170 FrameLoaderClient::SuddenTerminationDisablerType disablerType) {
171 Platform::current()->suddenTerminationChanged(!addedListener); 171 Platform::current()->suddenTerminationChanged(!addedListener);
172 if (domWindow->frame() && domWindow->frame()->loader().client()) 172 if (domWindow->frame() && domWindow->frame()->loader().client())
173 domWindow->frame()->loader().client()->suddenTerminationDisablerChanged( 173 domWindow->frame()->loader().client()->suddenTerminationDisablerChanged(
174 addedListener, disablerType); 174 addedListener, disablerType);
175 } 175 }
176 176
177 using DOMWindowSet = PersistentHeapHashCountedSet<WeakMember<LocalDOMWindow>>; 177 using DOMWindowSet = PersistentHeapHashCountedSet<WeakMember<LocalDOMWindow>>;
178 178
179 static DOMWindowSet& windowsWithUnloadEventListeners() { 179 static DOMWindowSet& windowsWithUnloadEventListeners() {
180 ALLOW_UNSAFE_SINGLETON()
180 DEFINE_STATIC_LOCAL(DOMWindowSet, windowsWithUnloadEventListeners, ()); 181 DEFINE_STATIC_LOCAL(DOMWindowSet, windowsWithUnloadEventListeners, ());
181 return windowsWithUnloadEventListeners; 182 return windowsWithUnloadEventListeners;
182 } 183 }
183 184
184 static DOMWindowSet& windowsWithBeforeUnloadEventListeners() { 185 static DOMWindowSet& windowsWithBeforeUnloadEventListeners() {
186 ALLOW_UNSAFE_SINGLETON()
185 DEFINE_STATIC_LOCAL(DOMWindowSet, windowsWithBeforeUnloadEventListeners, ()); 187 DEFINE_STATIC_LOCAL(DOMWindowSet, windowsWithBeforeUnloadEventListeners, ());
186 return windowsWithBeforeUnloadEventListeners; 188 return windowsWithBeforeUnloadEventListeners;
187 } 189 }
188 190
189 static void addUnloadEventListener(LocalDOMWindow* domWindow) { 191 static void addUnloadEventListener(LocalDOMWindow* domWindow) {
190 DOMWindowSet& set = windowsWithUnloadEventListeners(); 192 DOMWindowSet& set = windowsWithUnloadEventListeners();
191 if (set.isEmpty()) 193 if (set.isEmpty())
192 updateSuddenTerminationStatus(domWindow, true, 194 updateSuddenTerminationStatus(domWindow, true,
193 FrameLoaderClient::UnloadHandler); 195 FrameLoaderClient::UnloadHandler);
194 196
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 DOMWindow::trace(visitor); 1634 DOMWindow::trace(visitor);
1633 Supplementable<LocalDOMWindow>::trace(visitor); 1635 Supplementable<LocalDOMWindow>::trace(visitor);
1634 } 1636 }
1635 1637
1636 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1638 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1637 visitor->traceWrappers(m_customElements); 1639 visitor->traceWrappers(m_customElements);
1638 DOMWindow::traceWrappers(visitor); 1640 DOMWindow::traceWrappers(visitor);
1639 } 1641 }
1640 1642
1641 } // namespace blink 1643 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.cpp ('k') | third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698