Commit 8c8af291 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[api] Add comment on assumptions about SetWeak callback argument

Bug: v8:10101
Change-Id: If833324b1acebcde8a3bce8888d86c598ed14249
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037442
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66135}
parent dd8ff2cf
...@@ -532,11 +532,16 @@ template <class T> class PersistentBase { ...@@ -532,11 +532,16 @@ template <class T> class PersistentBase {
} }
/** /**
* Install a finalization callback on this object. * Install a finalization callback on this object.
* NOTE: There is no guarantee as to *when* or even *if* the callback is * NOTE: There is no guarantee as to *when* or even *if* the callback is
* invoked. The invocation is performed solely on a best effort basis. * invoked. The invocation is performed solely on a best effort basis.
* As always, GC-based finalization should *not* be relied upon for any * As always, GC-based finalization should *not* be relied upon for any
* critical form of resource management! * critical form of resource management!
*
* The callback is supposed to reset the handle. No further V8 API may be
* called in this callback. In case additional work involving V8 needs to be
* done, a second callback can be scheduled using
* WeakCallbackInfo<void>::SetSecondPassCallback.
*/ */
template <typename P> template <typename P>
V8_INLINE void SetWeak(P* parameter, V8_INLINE void SetWeak(P* parameter,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment