| 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 4340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4351 * further callbacks. | 4351 * further callbacks. |
| 4352 */ | 4352 */ |
| 4353 static void AddCallCompletedCallback(CallCompletedCallback callback); | 4353 static void AddCallCompletedCallback(CallCompletedCallback callback); |
| 4354 | 4354 |
| 4355 /** | 4355 /** |
| 4356 * Removes callback that was installed by AddCallCompletedCallback. | 4356 * Removes callback that was installed by AddCallCompletedCallback. |
| 4357 */ | 4357 */ |
| 4358 static void RemoveCallCompletedCallback(CallCompletedCallback callback); | 4358 static void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| 4359 | 4359 |
| 4360 /** | 4360 /** |
| 4361 * Allows the host application to group objects together. If one | |
| 4362 * object in the group is alive, all objects in the group are alive. | |
| 4363 * After each garbage collection, object groups are removed. It is | |
| 4364 * intended to be used in the before-garbage-collection callback | |
| 4365 * function, for instance to simulate DOM tree connections among JS | |
| 4366 * wrapper objects. Object groups for all dependent handles need to | |
| 4367 * be provided for kGCTypeMarkSweepCompact collections, for all other | |
| 4368 * garbage collection types it is sufficient to provide object groups | |
| 4369 * for partially dependent handles only. | |
| 4370 * See v8-profiler.h for RetainedObjectInfo interface description. | |
| 4371 */ | |
| 4372 // TODO(marja): deprecate AddObjectGroup. Use Isolate::SetObjectGroupId and | |
| 4373 // HeapProfiler::SetRetainedObjectInfo instead. | |
| 4374 static void AddObjectGroup(Persistent<Value>* objects, | |
| 4375 size_t length, | |
| 4376 RetainedObjectInfo* info = NULL); | |
| 4377 static void AddObjectGroup(Isolate* isolate, | |
| 4378 Persistent<Value>* objects, | |
| 4379 size_t length, | |
| 4380 RetainedObjectInfo* info = NULL); | |
| 4381 | |
| 4382 /** | |
| 4383 * Allows the host application to declare implicit references between | |
| 4384 * the objects: if |parent| is alive, all |children| are alive too. | |
| 4385 * After each garbage collection, all implicit references | |
| 4386 * are removed. It is intended to be used in the before-garbage-collection | |
| 4387 * callback function. | |
| 4388 */ | |
| 4389 // TODO(marja): Deprecate AddImplicitReferences. Use | |
| 4390 // Isolate::SetReferenceFromGroup instead. | |
| 4391 static void AddImplicitReferences(Persistent<Object> parent, | |
| 4392 Persistent<Value>* children, | |
| 4393 size_t length); | |
| 4394 | |
| 4395 /** | |
| 4396 * Initializes from snapshot if possible. Otherwise, attempts to | 4361 * Initializes from snapshot if possible. Otherwise, attempts to |
| 4397 * initialize from scratch. This function is called implicitly if | 4362 * initialize from scratch. This function is called implicitly if |
| 4398 * you use the API without calling it first. | 4363 * you use the API without calling it first. |
| 4399 */ | 4364 */ |
| 4400 static bool Initialize(); | 4365 static bool Initialize(); |
| 4401 | 4366 |
| 4402 /** | 4367 /** |
| 4403 * Allows the host application to provide a callback which can be used | 4368 * Allows the host application to provide a callback which can be used |
| 4404 * as a source of entropy for random number generators. | 4369 * as a source of entropy for random number generators. |
| 4405 */ | 4370 */ |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6308 | 6273 |
| 6309 | 6274 |
| 6310 } // namespace v8 | 6275 } // namespace v8 |
| 6311 | 6276 |
| 6312 | 6277 |
| 6313 #undef V8EXPORT | 6278 #undef V8EXPORT |
| 6314 #undef TYPE_CHECK | 6279 #undef TYPE_CHECK |
| 6315 | 6280 |
| 6316 | 6281 |
| 6317 #endif // V8_H_ | 6282 #endif // V8_H_ |
| OLD | NEW |