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

Side by Side Diff: include/v8.h

Issue 14175005: New GC related APIs: Implicit references. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Code review (mstarzinger) + test update Created 7 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after
3548 3548
3549 static void SetObjectGroupId(Isolate* isolate, 3549 static void SetObjectGroupId(Isolate* isolate,
3550 const Persistent<Value>& object, 3550 const Persistent<Value>& object,
3551 UniqueId id); 3551 UniqueId id);
3552 3552
3553 static void SetRetainedObjectInfo(Isolate* isolate, 3553 static void SetRetainedObjectInfo(Isolate* isolate,
3554 UniqueId id, 3554 UniqueId id,
3555 RetainedObjectInfo* info); 3555 RetainedObjectInfo* info);
3556 3556
3557 /** 3557 /**
3558 * Sets a representative object to a group. Used in conjunction with implicit
3559 * references: If you're going to use AddImplicitReference with the group, you
3560 * need to set a representative object too.
3561 */
3562 static void SetObjectGroupRepresentative(Isolate* isolate,
3563 UniqueId id,
3564 const Persistent<Object>& object);
3565
3566 /**
3558 * Allows the host application to declare implicit references between 3567 * Allows the host application to declare implicit references between
3559 * the objects: if |parent| is alive, all |children| are alive too. 3568 * the objects: if |parent| is alive, all |children| are alive too.
3560 * After each garbage collection, all implicit references 3569 * After each garbage collection, all implicit references
3561 * are removed. It is intended to be used in the before-garbage-collection 3570 * are removed. It is intended to be used in the before-garbage-collection
3562 * callback function. 3571 * callback function.
3563 */ 3572 */
3573 // TODO(marja): Deprecate AddImplicitReferences. Use
3574 // SetObjectGroupRepresentativeObject and AddImplicitReference instead.
3564 static void AddImplicitReferences(Persistent<Object> parent, 3575 static void AddImplicitReferences(Persistent<Object> parent,
3565 Persistent<Value>* children, 3576 Persistent<Value>* children,
3566 size_t length); 3577 size_t length);
3567 3578
3568 /** 3579 /**
3580 * Allows the host application to declare implicit references. If the
3581 * representative object of the object group (identified by id) is alive, the
3582 * children are alive too. After each garbage collection, all implicit
3583 * references are removed. It is intended to be used in the
3584 * before-garbage-collection callback function.
3585 */
3586 static void AddImplicitReference(Isolate* isolate,
3587 UniqueId id,
3588 const Persistent<Value>& object);
3589
3590 /**
3569 * Initializes from snapshot if possible. Otherwise, attempts to 3591 * Initializes from snapshot if possible. Otherwise, attempts to
3570 * initialize from scratch. This function is called implicitly if 3592 * initialize from scratch. This function is called implicitly if
3571 * you use the API without calling it first. 3593 * you use the API without calling it first.
3572 */ 3594 */
3573 static bool Initialize(); 3595 static bool Initialize();
3574 3596
3575 /** 3597 /**
3576 * Allows the host application to provide a callback which can be used 3598 * Allows the host application to provide a callback which can be used
3577 * as a source of entropy for random number generators. 3599 * as a source of entropy for random number generators.
3578 */ 3600 */
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
5169 5191
5170 5192
5171 } // namespace v8 5193 } // namespace v8
5172 5194
5173 5195
5174 #undef V8EXPORT 5196 #undef V8EXPORT
5175 #undef TYPE_CHECK 5197 #undef TYPE_CHECK
5176 5198
5177 5199
5178 #endif // V8_H_ 5200 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698