OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 } | 535 } |
536 | 536 |
537 /** | 537 /** |
538 * Install a finalization callback on this object. | 538 * Install a finalization callback on this object. |
539 * NOTE: There is no guarantee as to *when* or even *if* the callback is | 539 * NOTE: There is no guarantee as to *when* or even *if* the callback is |
540 * invoked. The invocation is performed solely on a best effort basis. | 540 * invoked. The invocation is performed solely on a best effort basis. |
541 * As always, GC-based finalization should *not* be relied upon for any | 541 * As always, GC-based finalization should *not* be relied upon for any |
542 * critical form of resource management! | 542 * critical form of resource management! |
543 */ | 543 */ |
544 template <typename P> | 544 template <typename P> |
545 V8_INLINE V8_DEPRECATED( | 545 V8_INLINE V8_DEPRECATE_SOON( |
546 "use WeakCallbackInfo version", | 546 "use WeakCallbackInfo version", |
547 void SetWeak(P* parameter, | 547 void SetWeak(P* parameter, |
548 typename WeakCallbackData<T, P>::Callback callback)); | 548 typename WeakCallbackData<T, P>::Callback callback)); |
549 | 549 |
550 template <typename S, typename P> | 550 template <typename S, typename P> |
551 V8_INLINE V8_DEPRECATED( | 551 V8_INLINE V8_DEPRECATE_SOON( |
552 "use WeakCallbackInfo version", | 552 "use WeakCallbackInfo version", |
553 void SetWeak(P* parameter, | 553 void SetWeak(P* parameter, |
554 typename WeakCallbackData<S, P>::Callback callback)); | 554 typename WeakCallbackData<S, P>::Callback callback)); |
555 | 555 |
556 // Phantom persistents work like weak persistents, except that the pointer to | 556 // Phantom persistents work like weak persistents, except that the pointer to |
557 // the object being collected is not available in the finalization callback. | 557 // the object being collected is not available in the finalization callback. |
558 // This enables the garbage collector to collect the object and any objects | 558 // This enables the garbage collector to collect the object and any objects |
559 // it references transitively in one GC cycle. At the moment you can either | 559 // it references transitively in one GC cycle. At the moment you can either |
560 // specify a parameter for the callback or the location of two internal | 560 // specify a parameter for the callback or the location of two internal |
561 // fields in the dying object. | 561 // fields in the dying object. |
562 template <typename P> | 562 template <typename P> |
563 V8_INLINE V8_DEPRECATED( | 563 V8_INLINE V8_DEPRECATE_SOON( |
564 "use SetWeak", | 564 "use SetWeak", |
565 void SetPhantom(P* parameter, | 565 void SetPhantom(P* parameter, |
566 typename WeakCallbackInfo<P>::Callback callback, | 566 typename WeakCallbackInfo<P>::Callback callback, |
567 int internal_field_index1 = -1, | 567 int internal_field_index1 = -1, |
568 int internal_field_index2 = -1)); | 568 int internal_field_index2 = -1)); |
569 | 569 |
570 template <typename P> | 570 template <typename P> |
571 V8_INLINE void SetWeak(P* parameter, | 571 V8_INLINE void SetWeak(P* parameter, |
572 typename WeakCallbackInfo<P>::Callback callback, | 572 typename WeakCallbackInfo<P>::Callback callback, |
573 WeakCallbackType type); | 573 WeakCallbackType type); |
(...skipping 7432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8006 */ | 8006 */ |
8007 | 8007 |
8008 | 8008 |
8009 } // namespace v8 | 8009 } // namespace v8 |
8010 | 8010 |
8011 | 8011 |
8012 #undef TYPE_CHECK | 8012 #undef TYPE_CHECK |
8013 | 8013 |
8014 | 8014 |
8015 #endif // V8_H_ | 8015 #endif // V8_H_ |
OLD | NEW |