I split this from bug 1319468, see https://bugzilla.mozilla.org/show_bug.cgi?id=1319468#c5 https://mozilla.logbot.info/jsapi/20190205#c15925279 But I have some questions 1. Do we need the if clause check below? `if (!mozilla::IsPointer<T>::value || thing)` https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/js/public/GCVariant.h#50 https://searchfox.org/mozilla-central /rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/js/public/GCVariant.h#79 the `if (thing)` check is initially for pointer types and the pointer check is done again in https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/js/src/gc/Policy.h#47 and `!mozilla::IsPointer<T>::value` is also confusing to me. Do we really need this? 2. Do we still need to call TraceRoot https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/js/src/vm/Realm.h#196 I think Rooted<> will call the trace function through DispatchWrapper, however the name argument is different, I am not sure if this matters.
Bug 1529006 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I split this from bug 1319468, see https://bugzilla.mozilla.org/show_bug.cgi?id=1319468#c5 https://mozilla.logbot.info/jsapi/20190205#c15925279 But I have some questions 1. Do we need the if clause check below? `if (!mozilla::IsPointer<T>::value || thing)` https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/js/public/GCVariant.h#50 https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/js/public/GCVariant.h#79 the `if (thing)` check is initially for pointer types and the pointer check is done again in https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/js/src/gc/Policy.h#47 and `!mozilla::IsPointer<T>::value` is also confusing to me. Do we really need this? 2. Do we still need to call TraceRoot https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/js/src/vm/Realm.h#196 I think Rooted<> will call the trace function through DispatchWrapper, however the name argument is different, I am not sure if this matters.