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

Side by Side Diff: third_party/WebKit/Source/platform/LifecycleNotifier.h

Issue 1381823002: Remove an assert that triggers a bad cast in blink::LifecycleNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no changes, just make sure the patch is accessible by bots Created 5 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
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 * 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 template<typename T, typename Observer> 87 template<typename T, typename Observer>
88 inline LifecycleNotifier<T, Observer>::~LifecycleNotifier() 88 inline LifecycleNotifier<T, Observer>::~LifecycleNotifier()
89 { 89 {
90 // FIXME: Enable the following ASSERT. Also see a FIXME in Document::detach( ). 90 // FIXME: Enable the following ASSERT. Also see a FIXME in Document::detach( ).
91 // ASSERT(!m_observers.size() || m_didCallContextDestroyed); 91 // ASSERT(!m_observers.size() || m_didCallContextDestroyed);
92 92
93 #if !ENABLE(OILPAN) 93 #if !ENABLE(OILPAN)
94 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); 94 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll);
95 for (Observer* observer : m_observers) { 95 for (Observer* observer : m_observers) {
96 ASSERT(observer->lifecycleContext() == context());
97 observer->clearLifecycleContext(); 96 observer->clearLifecycleContext();
98 } 97 }
99 #endif 98 #endif
100 } 99 }
101 100
102 template<typename T, typename Observer> 101 template<typename T, typename Observer>
103 inline void LifecycleNotifier<T, Observer>::notifyContextDestroyed() 102 inline void LifecycleNotifier<T, Observer>::notifyContextDestroyed()
104 { 103 {
105 // Don't notify contextDestroyed() twice. 104 // Don't notify contextDestroyed() twice.
106 if (m_didCallContextDestroyed) 105 if (m_didCallContextDestroyed)
(...skipping 25 matching lines...) Expand all
132 131
133 template<typename T, typename Observer> 132 template<typename T, typename Observer>
134 inline void LifecycleNotifier<T, Observer>::removeObserver(Observer* observer) 133 inline void LifecycleNotifier<T, Observer>::removeObserver(Observer* observer)
135 { 134 {
136 m_observers.remove(observer); 135 m_observers.remove(observer);
137 } 136 }
138 137
139 } // namespace blink 138 } // namespace blink
140 139
141 #endif // LifecycleNotifier_h 140 #endif // LifecycleNotifier_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698