Hi Michael,

Thanks for commenting!

On Tue, Sep 25, 2018 at 6:37 AM Michael Lippautz <mlippa...@chromium.org>
wrote:

> Looks like Isolate::VisitWeakHandles
> <https://cs.chromium.org/chromium/src/v8/src/api.cc?q=Isolate::VisitWeakHandles&sq=package:chromium&g=0&l=8852>
> only iterates over weak handles with a non-zero class id. Any chance that
> this one is still 0?
>

No, I set class ID to 1 just before calling SetWeak() -- for no other
purpose than this requirement. :)


> The symptom described here hints to the Scavenger collecting objects. From
> the above description it looks like you wanted to preserve those objects on
> Scavenge.
>
> Some ideas:
> - Maybe class id is 0 (see above)?
> - Maybe the handle are not SetWeak
> <https://cs.chromium.org/chromium/src/v8/include/v8.h?type=cs&q=v8::PersistentBase::SetWeak&sq=package:chromium&g=0&l=514>
> immediately but only after some time where a Scavenge could've happened?
>

But before calling SetWeak(), the handle would be strong, and therefore not
collected, right? Do I need to call MarkActive() at the same time as
SetWeak() to make sure any currently-running scavenges don't collect it?

-Kenton


>
>
>>
>>    - I don't do anything in any of the other EmbedderHeapTracer
>>    callbacks.
>>
>> Anything I'm missing here?
>>
>> I haven't been able to find any documentation on how to use these
>> interfaces. Please let me know if there are docs I missed.
>>
>>
> There's no additional documentation and you already found the existing
> implementations for wrapper tracing
> <https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.h?sq=package:chromium&dr&q=blink::ScriptWrappableMarking&g=0&l=32>
> and unified heap garbage collections
> <https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/heap/unified_heap_controller.h?sq=package:chromium&dr&q=blink::UnifiedHeap&g=0&l=31>
> .
>
> The Scavenger quirks are definitely something we should document though.
>
> Cheers, -Michael
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-users/e8LsFC-LNGE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to