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

Side by Side Diff: Source/heap/Visitor.h

Issue 167443003: Oilpan: reduce visibility of Visitor::trace(const RawPtr<T>&). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // Remove this once we remove RefPtrWillBeMember. 312 // Remove this once we remove RefPtrWillBeMember.
313 template<typename T> 313 template<typename T>
314 void trace(const RefPtr<T>&) 314 void trace(const RefPtr<T>&)
315 { 315 {
316 #if ENABLE(OILPAN) 316 #if ENABLE(OILPAN)
317 // RefPtrs should never be traced. 317 // RefPtrs should never be traced.
318 ASSERT_NOT_REACHED(); 318 ASSERT_NOT_REACHED();
319 #endif 319 #endif
320 } 320 }
321 321
322 #if !ENABLE(OILPAN)
322 // Similarly, this trace method is to trace a RawPtrWillBeMember 323 // Similarly, this trace method is to trace a RawPtrWillBeMember
323 // when ENABLE(OILPAN) is not enabled. 324 // when ENABLE(OILPAN) is not enabled.
324 // Remove this once we remove RawPtrWillBeMember. 325 // Remove this once we remove RawPtrWillBeMember.
325 template<typename T> 326 template<typename T>
326 void trace(const RawPtr<T>&) 327 void trace(const RawPtr<T>&)
327 { 328 {
328 #if ENABLE(OILPAN) 329 }
329 // RawPtrs should never be traced.
330 ASSERT_NOT_REACHED();
331 #endif 330 #endif
332 }
333 331
334 // This method marks an object and adds it to the set of objects 332 // This method marks an object and adds it to the set of objects
335 // that should have their trace method called. Since not all 333 // that should have their trace method called. Since not all
336 // objects have vtables we have to have the callback as an 334 // objects have vtables we have to have the callback as an
337 // explicit argument, but we can use the templated one-argument 335 // explicit argument, but we can use the templated one-argument
338 // mark method above to automatically provide the callback 336 // mark method above to automatically provide the callback
339 // function. 337 // function.
340 virtual void mark(const void*, TraceCallback) = 0; 338 virtual void mark(const void*, TraceCallback) = 0;
341 339
342 // Used to mark objects during conservative scanning. 340 // Used to mark objects during conservative scanning.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 return visitor->isMarked(obj); 541 return visitor->isMarked(obj);
544 } 542 }
545 template<typename T> bool ObjectAliveTrait<Member<T> >::isAlive(Visitor* visitor , const Member<T>& obj) 543 template<typename T> bool ObjectAliveTrait<Member<T> >::isAlive(Visitor* visitor , const Member<T>& obj)
546 { 544 {
547 return visitor->isMarked(obj.get()); 545 return visitor->isMarked(obj.get());
548 } 546 }
549 547
550 } 548 }
551 549
552 #endif 550 #endif
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