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

Side by Side Diff: Source/platform/heap/ThreadState.h

Issue 1164643005: Oilpan: Add ENABLE_LAZY_SWEEPING and ENABLE_IDLE_GC to features.gypi (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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) 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 class Visitor; 65 class Visitor;
66 66
67 using Address = uint8_t*; 67 using Address = uint8_t*;
68 68
69 using FinalizationCallback = void (*)(void*); 69 using FinalizationCallback = void (*)(void*);
70 using VisitorCallback = void (*)(Visitor*, void* self); 70 using VisitorCallback = void (*)(Visitor*, void* self);
71 using TraceCallback = VisitorCallback; 71 using TraceCallback = VisitorCallback;
72 using WeakCallback = VisitorCallback; 72 using WeakCallback = VisitorCallback;
73 using EphemeronCallback = VisitorCallback; 73 using EphemeronCallback = VisitorCallback;
74 74
75 #if ENABLE(OILPAN)
76 #define ENABLE_LAZY_SWEEPING 1
77 #else
78 // TODO(haraken): Enable lazy sweeping on non-oilpan builds.
79 #define ENABLE_LAZY_SWEEPING 0
80 #endif
81
82 // Declare that a class has a pre-finalizer function. The function is called in 75 // Declare that a class has a pre-finalizer function. The function is called in
83 // the object's owner thread, and can access Member<>s to other 76 // the object's owner thread, and can access Member<>s to other
84 // garbage-collected objects allocated in the thread. However we must not 77 // garbage-collected objects allocated in the thread. However we must not
85 // allocate new garbage-collected objects, nor update Member<> and Persistent<> 78 // allocate new garbage-collected objects, nor update Member<> and Persistent<>
86 // pointers. 79 // pointers.
87 // 80 //
88 // This feature is similar to the HeapHashMap<WeakMember<Foo>, OwnPtr<Disposer>> 81 // This feature is similar to the HeapHashMap<WeakMember<Foo>, OwnPtr<Disposer>>
89 // idiom. The difference between this and the idiom is that pre-finalizer 82 // idiom. The difference between this and the idiom is that pre-finalizer
90 // function is called whenever an object is destructed with this feature. The 83 // function is called whenever an object is destructed with this feature. The
91 // HeapHashMap<WeakMember<Foo>, OwnPtr<Disposer>> idiom requires an assumption 84 // HeapHashMap<WeakMember<Foo>, OwnPtr<Disposer>> idiom requires an assumption
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 }; 737 };
745 738
746 template<> class ThreadStateFor<AnyThread> { 739 template<> class ThreadStateFor<AnyThread> {
747 public: 740 public:
748 static ThreadState* state() { return ThreadState::current(); } 741 static ThreadState* state() { return ThreadState::current(); }
749 }; 742 };
750 743
751 } // namespace blink 744 } // namespace blink
752 745
753 #endif // ThreadState_h 746 #endif // ThreadState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698