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

Side by Side Diff: Source/platform/Supplementable.h

Issue 230083003: Oilpan: Move WorkerClients to the managed heap and trace its supplements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: CR comments and unbreak the non-oilpan build Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 return this->m_supplements.get(key); 177 return this->m_supplements.get(key);
178 } 178 }
179 179
180 void reattachThread() 180 void reattachThread()
181 { 181 {
182 #if !ASSERT_DISABLED 182 #if !ASSERT_DISABLED
183 m_threadId = currentThread(); 183 m_threadId = currentThread();
184 #endif 184 #endif
185 } 185 }
186 186
187 void trace(Visitor* visitor) { visitor->trace(m_supplements); } 187 virtual void trace(Visitor* visitor) { visitor->trace(m_supplements); }
188 188
189 private: 189 private:
190 typename SupplementableTraits<T, isGarbageCollected>::SupplementMap m_supple ments; 190 typename SupplementableTraits<T, isGarbageCollected>::SupplementMap m_supple ments;
191 191
192 #if !ASSERT_DISABLED 192 #if !ASSERT_DISABLED
193 protected: 193 protected:
194 SupplementableBase() : m_threadId(currentThread()) { } 194 SupplementableBase() : m_threadId(currentThread()) { }
195 195
196 private: 196 private:
197 ThreadIdentifier m_threadId; 197 ThreadIdentifier m_threadId;
(...skipping 18 matching lines...) Expand all
216 }; 216 };
217 217
218 template<typename T> 218 template<typename T>
219 struct ThreadingTrait<WebCore::SupplementableBase<T, true> > { 219 struct ThreadingTrait<WebCore::SupplementableBase<T, true> > {
220 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; 220 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity;
221 }; 221 };
222 222
223 } // namespace WebCore 223 } // namespace WebCore
224 224
225 #endif // Supplementable_h 225 #endif // Supplementable_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp ('k') | Source/web/DatabaseClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698