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

Unified Diff: third_party/WebKit/Source/platform/heap/BlinkGCAPIReference.md

Issue 2565983002: Implicit prefinalizer registration. (Closed)
Patch Set: recast registration class Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/BlinkGCAPIReference.md
diff --git a/third_party/WebKit/Source/platform/heap/BlinkGCAPIReference.md b/third_party/WebKit/Source/platform/heap/BlinkGCAPIReference.md
index e9815c3df46a9f0a835b1cbb33695668e251b8d5..8a7abc56a84ccd036835109a2e530d043d572ef2 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGCAPIReference.md
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCAPIReference.md
@@ -178,17 +178,10 @@ with a destructor.
A pre-finalizer must have the following function signature: `void preFinalizer()`. You can change the function name.
-A pre-finalizer must be registered in the constructor by using the following statement:
-"`ThreadState::current()->registerPreFinalizer(this);`".
-
```c++
class YourClass : public GarbageCollectedFinalized<YourClass> {
USING_PRE_FINALIZER(YourClass, dispose);
public:
- YourClass()
- {
- ThreadState::current()->registerPreFinalizer(this);
- }
void dispose()
{
m_other->dispose(); // OK; you can touch other on-heap objects in a pre-finalizer.
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp ('k') | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698