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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
395 | 395 |
396 /** | 396 /** |
397 * Marks the reference to this object independent. Garbage collector | 397 * Marks the reference to this object independent. Garbage collector |
398 * is free to ignore any object groups containing this object. | 398 * is free to ignore any object groups containing this object. |
399 * Weak callback for an independent handle should not | 399 * Weak callback for an independent handle should not |
400 * assume that it will be preceded by a global GC prologue callback | 400 * assume that it will be preceded by a global GC prologue callback |
401 * or followed by a global GC epilogue callback. | 401 * or followed by a global GC epilogue callback. |
402 */ | 402 */ |
403 inline void MarkIndependent(); | 403 inline void MarkIndependent(); |
404 | 404 |
405 /** | |
406 Marks the reference to this object externally unreachable. | |
407 Scavenger GC treats this object unreachable if all objects | |
408 in the object group which this object belongs to are neither | |
409 strongly reachable nor weakly reachable. This mark is cleared | |
410 after each scavenger GC. If this object is not in the new | |
411 space, this API has no effect. | |
412 */ | |
413 inline void MarkExternallyUnreachable(); | |
414 | |
405 /** Returns true if this handle was previously marked as independent. */ | 415 /** Returns true if this handle was previously marked as independent. */ |
406 inline bool IsIndependent() const; | 416 inline bool IsIndependent() const; |
407 | 417 |
408 /** Checks if the handle holds the only reference to an object. */ | 418 /** Checks if the handle holds the only reference to an object. */ |
409 inline bool IsNearDeath() const; | 419 inline bool IsNearDeath() const; |
410 | 420 |
411 /** Returns true if the handle's reference is weak. */ | 421 /** Returns true if the handle's reference is weak. */ |
412 inline bool IsWeak() const; | 422 inline bool IsWeak() const; |
413 | 423 |
414 /** | 424 /** |
(...skipping 3071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3486 private: | 3496 private: |
3487 V8(); | 3497 V8(); |
3488 | 3498 |
3489 static internal::Object** GlobalizeReference(internal::Object** handle); | 3499 static internal::Object** GlobalizeReference(internal::Object** handle); |
3490 static void DisposeGlobal(internal::Object** global_handle); | 3500 static void DisposeGlobal(internal::Object** global_handle); |
3491 static void MakeWeak(internal::Object** global_handle, | 3501 static void MakeWeak(internal::Object** global_handle, |
3492 void* data, | 3502 void* data, |
3493 WeakReferenceCallback); | 3503 WeakReferenceCallback); |
3494 static void ClearWeak(internal::Object** global_handle); | 3504 static void ClearWeak(internal::Object** global_handle); |
3495 static void MarkIndependent(internal::Object** global_handle); | 3505 static void MarkIndependent(internal::Object** global_handle); |
3506 <<<<<<< HEAD | |
3496 static bool IsGlobalIndependent(internal::Object** global_handle); | 3507 static bool IsGlobalIndependent(internal::Object** global_handle); |
3508 ======= | |
3509 static void MarkExternallyUnreachable(internal::Object** global_handle); | |
3510 >>>>>>> temp | |
abarth-chromium
2012/10/24 17:35:01
Looks like you have some conflict markers in your
| |
3497 static bool IsGlobalNearDeath(internal::Object** global_handle); | 3511 static bool IsGlobalNearDeath(internal::Object** global_handle); |
3498 static bool IsGlobalWeak(internal::Object** global_handle); | 3512 static bool IsGlobalWeak(internal::Object** global_handle); |
3499 static void SetWrapperClassId(internal::Object** global_handle, | 3513 static void SetWrapperClassId(internal::Object** global_handle, |
3500 uint16_t class_id); | 3514 uint16_t class_id); |
3501 static uint16_t GetWrapperClassId(internal::Object** global_handle); | 3515 static uint16_t GetWrapperClassId(internal::Object** global_handle); |
3502 | 3516 |
3503 template <class T> friend class Handle; | 3517 template <class T> friend class Handle; |
3504 template <class T> friend class Local; | 3518 template <class T> friend class Local; |
3505 template <class T> friend class Persistent; | 3519 template <class T> friend class Persistent; |
3506 friend class Context; | 3520 friend class Context; |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4257 void Persistent<T>::ClearWeak() { | 4271 void Persistent<T>::ClearWeak() { |
4258 V8::ClearWeak(reinterpret_cast<internal::Object**>(**this)); | 4272 V8::ClearWeak(reinterpret_cast<internal::Object**>(**this)); |
4259 } | 4273 } |
4260 | 4274 |
4261 template <class T> | 4275 template <class T> |
4262 void Persistent<T>::MarkIndependent() { | 4276 void Persistent<T>::MarkIndependent() { |
4263 V8::MarkIndependent(reinterpret_cast<internal::Object**>(**this)); | 4277 V8::MarkIndependent(reinterpret_cast<internal::Object**>(**this)); |
4264 } | 4278 } |
4265 | 4279 |
4266 template <class T> | 4280 template <class T> |
4281 void Persistent<T>::MarkExternallyUnreachable() { | |
4282 V8::MarkExternallyUnreachable(reinterpret_cast<internal::Object**>(**this)); | |
4283 } | |
4284 | |
4285 template <class T> | |
4267 void Persistent<T>::SetWrapperClassId(uint16_t class_id) { | 4286 void Persistent<T>::SetWrapperClassId(uint16_t class_id) { |
4268 V8::SetWrapperClassId(reinterpret_cast<internal::Object**>(**this), class_id); | 4287 V8::SetWrapperClassId(reinterpret_cast<internal::Object**>(**this), class_id); |
4269 } | 4288 } |
4270 | 4289 |
4271 template <class T> | 4290 template <class T> |
4272 uint16_t Persistent<T>::WrapperClassId() const { | 4291 uint16_t Persistent<T>::WrapperClassId() const { |
4273 return V8::GetWrapperClassId(reinterpret_cast<internal::Object**>(**this)); | 4292 return V8::GetWrapperClassId(reinterpret_cast<internal::Object**>(**this)); |
4274 } | 4293 } |
4275 | 4294 |
4276 Arguments::Arguments(internal::Object** implicit_args, | 4295 Arguments::Arguments(internal::Object** implicit_args, |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4696 | 4715 |
4697 | 4716 |
4698 } // namespace v8 | 4717 } // namespace v8 |
4699 | 4718 |
4700 | 4719 |
4701 #undef V8EXPORT | 4720 #undef V8EXPORT |
4702 #undef TYPE_CHECK | 4721 #undef TYPE_CHECK |
4703 | 4722 |
4704 | 4723 |
4705 #endif // V8_H_ | 4724 #endif // V8_H_ |
OLD | NEW |