bug 1442776 treat PinnedStringId as rooted GC pointer in hazard analysis r=sfink draft
authorKarl Tomlinson <karlt+@karlt.net>
Tue, 05 Jun 2018 16:51:10 +1200
changeset 804497 522ccf7dbf28bbfb881a4c13dfb62f369d7791d7
parent 803743 d8f180ab74921fd07a66d6868914a48e5f9ea797
child 804498 3c2accb71faf3f017a44c405ae0484e57aaf039c
push id112390
push userktomlinson@mozilla.com
push dateWed, 06 Jun 2018 03:40:45 +0000
reviewerssfink
bugs1442776
milestone62.0a1
bug 1442776 treat PinnedStringId as rooted GC pointer in hazard analysis r=sfink MozReview-Commit-ID: GFPSwczIZxV
dom/bindings/BindingUtils.h
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -3105,17 +3105,17 @@ class PinnedStringId
   operator const jsid& () const {
     return id;
   }
 
   operator JS::Handle<jsid> () const {
     /* This is safe because we have pinned the string. */
     return JS::Handle<jsid>::fromMarkedLocation(&id);
   }
-};
+} JS_HAZ_ROOTED;
 
 namespace binding_detail {
 /**
  * WebIDL getters have a "generic" JSNative that is responsible for the
  * following things:
  *
  * 1) Determining the "this" pointer for the C++ call.
  * 2) Extracting the "specialized" getter from the jitinfo on the JSFunction.