OLD | NEW |
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 3422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3433 * object in the group is alive, all objects in the group are alive. | 3433 * object in the group is alive, all objects in the group are alive. |
3434 * After each garbage collection, object groups are removed. It is | 3434 * After each garbage collection, object groups are removed. It is |
3435 * intended to be used in the before-garbage-collection callback | 3435 * intended to be used in the before-garbage-collection callback |
3436 * function, for instance to simulate DOM tree connections among JS | 3436 * function, for instance to simulate DOM tree connections among JS |
3437 * wrapper objects. Object groups for all dependent handles need to | 3437 * wrapper objects. Object groups for all dependent handles need to |
3438 * be provided for kGCTypeMarkSweepCompact collections, for all other | 3438 * be provided for kGCTypeMarkSweepCompact collections, for all other |
3439 * garbage collection types it is sufficient to provide object groups | 3439 * garbage collection types it is sufficient to provide object groups |
3440 * for partially dependent handles only. | 3440 * for partially dependent handles only. |
3441 * See v8-profiler.h for RetainedObjectInfo interface description. | 3441 * See v8-profiler.h for RetainedObjectInfo interface description. |
3442 */ | 3442 */ |
| 3443 // TODO(marja): deprecate AddObjectGroup. Use SetObjectGroupID and |
| 3444 // SetRetainedObjectInfo instead. |
3443 static void AddObjectGroup(Persistent<Value>* objects, | 3445 static void AddObjectGroup(Persistent<Value>* objects, |
3444 size_t length, | 3446 size_t length, |
3445 RetainedObjectInfo* info = NULL); | 3447 RetainedObjectInfo* info = NULL); |
3446 static void AddObjectGroup(Isolate* isolate, | 3448 static void AddObjectGroup(Isolate* isolate, |
3447 Persistent<Value>* objects, | 3449 Persistent<Value>* objects, |
3448 size_t length, | 3450 size_t length, |
3449 RetainedObjectInfo* info = NULL); | 3451 RetainedObjectInfo* info = NULL); |
3450 | 3452 |
| 3453 static void SetObjectGroupId(Isolate* isolate, |
| 3454 const Persistent<Value>& object, |
| 3455 void* id); |
| 3456 |
| 3457 static void SetRetainedObjectInfo(Isolate* isolate, |
| 3458 void* id, |
| 3459 RetainedObjectInfo* info); |
| 3460 |
3451 /** | 3461 /** |
3452 * Allows the host application to declare implicit references between | 3462 * Allows the host application to declare implicit references between |
3453 * the objects: if |parent| is alive, all |children| are alive too. | 3463 * the objects: if |parent| is alive, all |children| are alive too. |
3454 * After each garbage collection, all implicit references | 3464 * After each garbage collection, all implicit references |
3455 * are removed. It is intended to be used in the before-garbage-collection | 3465 * are removed. It is intended to be used in the before-garbage-collection |
3456 * callback function. | 3466 * callback function. |
3457 */ | 3467 */ |
3458 static void AddImplicitReferences(Persistent<Object> parent, | 3468 static void AddImplicitReferences(Persistent<Object> parent, |
3459 Persistent<Value>* children, | 3469 Persistent<Value>* children, |
3460 size_t length); | 3470 size_t length); |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5039 | 5049 |
5040 | 5050 |
5041 } // namespace v8 | 5051 } // namespace v8 |
5042 | 5052 |
5043 | 5053 |
5044 #undef V8EXPORT | 5054 #undef V8EXPORT |
5045 #undef TYPE_CHECK | 5055 #undef TYPE_CHECK |
5046 | 5056 |
5047 | 5057 |
5048 #endif // V8_H_ | 5058 #endif // V8_H_ |
OLD | NEW |