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

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: style 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') | src/global-handles.h » ('J')
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 3525 matching lines...) Expand 10 before | Expand all | Expand 10 after
3536 RetainedObjectInfo* info = NULL); 3536 RetainedObjectInfo* info = NULL);
3537 3537
3538 static void SetObjectGroupId(Isolate* isolate, 3538 static void SetObjectGroupId(Isolate* isolate,
3539 const Persistent<Value>& object, 3539 const Persistent<Value>& object,
3540 UniqueId id); 3540 UniqueId id);
3541 3541
3542 static void SetRetainedObjectInfo(Isolate* isolate, 3542 static void SetRetainedObjectInfo(Isolate* isolate,
3543 UniqueId id, 3543 UniqueId id,
3544 RetainedObjectInfo* info); 3544 RetainedObjectInfo* info);
3545 3545
3546 static void SetObjectGroupRepresentativeObject(
Michael Starzinger 2013/04/16 10:42:16 Can we add a short comment to this method that men
marja 2013/04/16 12:28:37 Done.
3547 Isolate* isolate,
3548 UniqueId id,
3549 const Persistent<Object>& object);
3550
3546 /** 3551 /**
3547 * Allows the host application to declare implicit references between 3552 * Allows the host application to declare implicit references between
3548 * the objects: if |parent| is alive, all |children| are alive too. 3553 * the objects: if |parent| is alive, all |children| are alive too.
3549 * After each garbage collection, all implicit references 3554 * After each garbage collection, all implicit references
3550 * are removed. It is intended to be used in the before-garbage-collection 3555 * are removed. It is intended to be used in the before-garbage-collection
3551 * callback function. 3556 * callback function.
3552 */ 3557 */
3558 // TODO(marja): Deprecate AddImplicitReferences. Use
3559 // SetObjectGroupRepresentativeObject and AddImplicitReference instead.
3553 static void AddImplicitReferences(Persistent<Object> parent, 3560 static void AddImplicitReferences(Persistent<Object> parent,
3554 Persistent<Value>* children, 3561 Persistent<Value>* children,
3555 size_t length); 3562 size_t length);
3556 3563
3557 /** 3564 /**
3565 * Allows the host application to declare implicit references. If the
3566 * representative object of the object group (identified by id) is alive, the
3567 * children are alive too. After each garbage collection, all implicit
3568 * references are removed. It is intended to be used in the
3569 * before-garbage-collection callback function. */
Michael Starzinger 2013/04/16 10:42:16 nit: Close comment on next line.
marja 2013/04/16 12:28:37 Done.
3570 static void AddImplicitReference(Isolate* isolate,
3571 UniqueId id,
3572 const Persistent<Value>& object);
3573
3574 /**
3558 * Initializes from snapshot if possible. Otherwise, attempts to 3575 * Initializes from snapshot if possible. Otherwise, attempts to
3559 * initialize from scratch. This function is called implicitly if 3576 * initialize from scratch. This function is called implicitly if
3560 * you use the API without calling it first. 3577 * you use the API without calling it first.
3561 */ 3578 */
3562 static bool Initialize(); 3579 static bool Initialize();
3563 3580
3564 /** 3581 /**
3565 * Allows the host application to provide a callback which can be used 3582 * Allows the host application to provide a callback which can be used
3566 * as a source of entropy for random number generators. 3583 * as a source of entropy for random number generators.
3567 */ 3584 */
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
5158 5175
5159 5176
5160 } // namespace v8 5177 } // namespace v8
5161 5178
5162 5179
5163 #undef V8EXPORT 5180 #undef V8EXPORT
5164 #undef TYPE_CHECK 5181 #undef TYPE_CHECK
5165 5182
5166 5183
5167 #endif // V8_H_ 5184 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/global-handles.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698