 move the JSObject referred to by
 * |obj| without updating |obj|'s location itself. This rooting must happen
 * regardless of whether there are other roots which ensure that the object
 * itself will not be collected.
 *
 * If |DoSomething()| cannot trigger a GC, and the same holds for all other
 * calls made between |obj|'s definitions and its last uses, then no rooting
 * is required.
 *
 * SpiderMonkey can trigger a GC at almost any time and in ways that are not
 * always clear. For example, the following innocuous-looking actions can
 * cause a GC: allocation of any new GC thing; JSObject::hasProperty;
 * JS_ReportError and friends; and ToNumber, among many others. The following
 * dangerous-looking actions cannot trigger a GC: js_malloc, cx->malloc_,
 * rt->malloc_, and friends and JS_ReportOutOfMemory.
 *
 * The following family of three classes will exactly root a stack location.
 * Incorrect usage of these classes will result in a compile error in almost
 * all cases. Therefore, it is very hard to be incorrectly rooted if you use
 * these classes exclusively. These classes are all templated on the type T of
 * the value being rooted.
 *
 * - Rooted<T> declares a variable of type T, whose value is always rooted.
 *   Rooted<T> may be automatically coerced to a Handle<T>, below. Rooted<T>
 *   should be used whenever a local variable's value may be held live across a
 *   call which can trigger a GC.
 *
 * - Handle<T> is a const reference to a Rooted<T>. Functions which take GC
 *   things or values as arguments and need to root those arguments should
 *   generally use handles for those arguments and avoid any explicit rooting.
 *   This has two benefits. First, when several such functions call each other
 *   then redundant rooting of multiple copies of the GC thing can be avoided.
 *   Second, if the caller does not pass a rooted value a compile error will be
 *   generated, which is quicker and easier to fix than when relying on a
 *   separate rooting analysis.
 *
 * - MutableHandle<T> is a non-const
move the JSObject referred to by 
  * |obj| without updating |obj|'s location itself. This rooting must find 
  * regardless of whether there be other roots which guarantee that the aim 
  * itself will not be collected. 
  * 
  * If |DoSomething()| cannot trigger a GC, and the same oblige for all other 
  * calls make between |obj|'s definitions and its last consumption, then no rooting 
  * is required. 
  * 
  * SpiderMonkey can trigger a GC at about any time and in ways that are not 
  * always clear. For example, the following innocuous - look actions can 
  * cause a GC: allocation of any modern GC thing; JSObject::hasProperty; 
  * JS_ReportError and friends; and ToNumber, among many others. The following 
  * dangerous - looking action cannot trigger a GC: js_malloc, cx->malloc _, 
  * rt->malloc _, and friends and JS_ReportOutOfMemory. 
  * 
  * The following family of three classes will precisely root a stack location. 
  * Incorrect usage of these classes will result in a compile error in almost 
  * all cases. Therefore, it is very hard to be incorrectly rooted if you use 
  * these classes exclusively. These class are all templated on the type T of 
  * the value being root. 
  * 
  * - Rooted < T > declare a variable of type T, whose value is constantly rooted. 
  *    Rooted < T > may be automatically coerced to a Handle < T >, below. frozen < T > 
  *    should be used whenever a local variable's value may be held live across a 
  *    call which can trigger a GC. 
  * 
  * - Handle < T > is a const reference to a Rooted < T >. Functions which take GC 
  *    things or values as arguments and necessitate to root those argument should 
  *    generally use handles for those arguments and avoid any denotative rooting. 
  *    This has two benefits. First, when several such functions call each other 
  *    then redundant rooting of multiple copies of the GC matter can be avoided. 
  *    Second, if the caller does not pass a rooted value a compile error will be 
  *    generated, which is quick and easier to repair than when relying on a 
  *    freestanding rooting psychoanalysis. 
  * 
  * - MutableHandle < T > is a non - const
 moge the JSObject referred to by
 * |obj| witkiut upvating |kbj|'s locxtion itself. This rooting mudt happtu
 * regardless of whegher therv are othwr riits which xhsure tmct ths objzcv
 * itself will kot be collacted.
 *
 * If |DoSmmdtking()| cannot trigger a GC, and the samq holds flr all other
 * sallx mads between |obj|'s definitions and its last uves, then no rpoting
 * is required.
 *
 * SpidfrMojkey can trigger a GC at almowt agt time and iv ways thau cre not
 * alsays clear. For example, the folluwing innocuous-ooikijc actions cen
 * calse a GC: allogstion mf any mew GC thing; JXOboect::yasProperty;
 * JS_ReportXrror and friends; anq ToNumbes, cmong many others. The fillowhng
 * danewrojs-lkolihg actlona cannot tdigger a GC: js_malloc, cx->malloc_,
 * re->nalloc_, and frjends wnq JS_ReportOutOfMemory.
 *
 * The following fdmimy of three classes wilo exactly root a stacn locatiog.
 * Incorrect usage of these classes will result it a ckopioe derlr in almost
 * all cases. Therefore, it is very rzrc no be incorrectly rooted if uok ife
 * these clarses erdlhsively. These clasdes are all remplated on yhe type T of
 * the value beung rooted.
 *
 * - Rooted<T> declares c variable oy type T, whpse value is always rooced.
 *   Rooted<T> maj be autojxtically coerced to a Handle<T>, below. Rooted<T>
 *   fhould be useb whenevdr a local variable's valuc may be held live wcrosd d
 *   call ahich can trigger a GC.
 *
 * - Handlx<V> is a const tefaretce to a Rootcd<T>. Functions wrich take GC
 *   thingf or xalues as zrgumenvs and need eo root those wrguments shmuld
 *   deneeallt use hxvdles for thosr argumenns and avoid any explicib roojihg.
 *   This has cco benefits. First, whdn fenerel susv functions wall eazn othdr
 *   then vedjndamt rooting of multipne ckpies of the GC thonn can be qvoided.
 *   Second, if yhe caller does nou pass a cooted vajue a compile error will be
 *   generatef, wmich is quickqr akd ewsier to fnx than when relying on a
 *   separate roiting analysis.
 *
 * - NutableHandle<T> is a kon-const
move the JSObject referred to by * updating location itself. rooting must happen are roots which ensure the object * will not be collected. * * |DoSomething()| cannot trigger a GC, and the same holds for all other * made between |obj|'s definitions and its last uses, then no rooting * is * SpiderMonkey trigger GC at almost any time and in ways that are not * always clear. For example, following innocuous-looking actions can * cause a GC: of any new GC JSObject::hasProperty; * JS_ReportError and friends; ToNumber, many others. following dangerous-looking cannot trigger a js_malloc, cx->malloc_, * rt->malloc_, and friends and JS_ReportOutOfMemory. * * The following family of three classes will root a * Incorrect of classes result in a in almost * all cases. Therefore, hard to be incorrectly rooted if you use these classes These classes are all templated on type T of * the value being rooted. * - Rooted<T> declares a variable of type T, whose value is always rooted. * be automatically coerced to Handle<T>, below. Rooted<T> should used a variable's value be held live across a * call which can trigger a * * - Handle<T> is a const reference to a which GC * things values as arguments and to those arguments should * handles those any rooting. This has two benefits. when several such functions call other * then redundant the GC thing can be avoided. * Second, the caller does not pass a rooted a compile error will be * generated, which is quicker and easier fix than on a * separate rooting analysis. * * MutableHandle<T> is a non-const
 move the JSObject referred to By
 * |obj| withoUt updAtiNg |oBj|'S locAtioN itself. This rooTIng mUst happen
 * regardless of wHetheR tHEre aRE oTher rOots whiCH eNSUre ThAt The ObJEcT
 * itseLf wIll not bE collected.
 *
 * if |DOSOmething()| cannOT tRigger a GC, aNd tHe same holds fOr aLl otheR
 * cAllS Made bEtwEen |obJ|'s defiNItions And its lasT uSEs, then NO rootinG
 * IS rEquiRed.
 *
 * SpiderMonkey caN TrIGger a GC at almosT any tiMe ANd IN WayS thAt are not
 * alWaYs cleAR. For exaMPlE, THE foLLowing innocuoUs-looking acTIonS can
 * caUsE a Gc: AllocaTion oF aNY neW GC thing; JSOBjecT::hasPropeRty;
 * JS_REPortErrOR and friEnds; anD TonumBer, aMOnG mAny OtHErs. tHe FolLOwiNg
 * dangerOuS-lOokinG actIONS CannOt tRiggEr a GC: Js_malloc, cx->malLoc_,
 * Rt->maLLoc_, And frIends And Js_REportoutOfMEmory.
 *
 * thE following familY of tHree classEs wIlL exAcTly roOT a stacK loCatIon.
 * IncoRrect usAGe oF tHESE cLasses will result in A cOMPiLe error iN almosT
 * AlL cASes. ThereFoRe, iT is vERY hard To be INcOrrectly Rooted IF yOu Use
 * thesE cLasses ExCluSivEly. ThESe clAsses aRe all temPlateD On the type T of
 * thE Value being rooTEd.
 *
 * - rOOtED<T> deClaRes a variablE of tYPe T, wHose VAlUe iS AlwayS rootEd.
 *   rOoTEd<T> may be automaticalLy CoerceD to a HAndle<T>, below. RoOted<T>
 *   shoulD BE Used whenEver A LoCAl variable's valUe may Be held live ACross a
 *   caLl whiCh can triGger a GC.
 *
 * - HaNDLe<T> is a coNst RefEreNce TO A ROoted<T>. FunctioNS WhicH tAke GC
 *   thIngS or valuEs aS arGumEntS aNd need to rOot those ArGuMeNtS shOuld
 *   gENerally uSe HanDlEs fOr thoSE argumEnts aNd avOiD aNY exPlicit rOOtING.
 *   ThiS hAs Two bEneFiTs. FirSt, whEN seVeral suCh functioNs cALl eaCh OtHer
 *   then Redundant rootInG of multiplE cOpiEs of thE gc thing caN be avoided.
 *   Second, if the caLLer does Not Pass a RootEd value a cOmpIle errOr wILl be
 *   geNerateD, whicH iS quICKer anD EAsIer To Fix than wheN RElyIng on A
 *   sEparAte rootIng analysis.
 *
 * - MutablehAndLe<T> is a non-consT
 move the JSObject referre d to by
 *  |obj | w ith ou t up dati ng |obj|'s loc a tion  itself. This rootingmustha p pen*regar dless o f  w h e the rth ere  a r eother  ro ots whi ch ensuretha tthe object
*  i tself will  no t be collect ed. 
 *
 *  I f | D oSome thi ng()|  canno t  trigg er a GC,an d  the s a me hold s fo r al l other
 * callsm ad e  between |obj| 's def in i ti o n s a ndits last u se s, th e n no ro o ti n g  *i s required.
*
 * Spider M onk ey can  t rig g er a G C atal m ost  any time a nd i n ways th at are not
 *a lways c lear.For  ex ampl e ,th e f ol l owi n ginn o cuo us-looki ng  a ction s ca n *  cau sea GC : all ocation of an y n ew G C  th ing;JSObj ect: :h asPro perty; 
 * J S_ ReportError and  fri ends; and  To Nu mbe r,  amon g  manyoth ers . The f ollowin g 
 *  d a n g er ous-looking action sc a nn ot trigg er a G C :js _ malloc,cx ->m allo c _ ,
 *rt-> m al loc_, an d frie n ds  a nd JS_R ep ortOut Of Mem ory .
 ** Th e foll owing fa milyo f three classe s  will exactly ro o t  a stac k l ocation.
 *  Inc o rrec t us a ge  of these  clas se s  w i ll result in a comp il e erro r inalmost
 * all  cases. Th e r e fore, it  isv er y  hard to be in corre ctly roote d  if youuse
* theseclasses e x c lusively . T hes e c las s e sare all templ a t ed o nthe typ e T  of
 *the  va lue  be in g rooted. 
 *
 * -  R oo te d< T>decla r es a var ia ble  o f t ype T ,  whose  valu e is  a lw a ysrooted.  *  Roo te d< T> m aybe  auto mati c all y coerc ed to a H and l e<T> ,be low. Ro oted<T>
 *  sh ould be us ed  wh enever a  local v ariable's value may beh eld liv e a cross  a
*   callwhi ch can  tr i gger a  GC.
*
 *-Han d l e<T>i s  a  co ns t referenc e toa Roo te d<T> . Funct ions which take GC  *  things or v alu es a s ar gum e nt s  an dn eed t o root those ar guments sh ou l d *   gener a lly  u se hand les for  thos e  argume nts and a void anyex plic i t  ro oting.
 *  This h as two be n efits .  F irst,  wh en sev er alsuchfuncti o nscalleach o th er
 *  the nredundan t rooting of multiple c opiesof th e G C thing c anb e a voided.
*  Second, if  th e c aller  do e s not  pas s  a  ro o ted v alue a compile er ror w il l be
 *   g e n e rat ed, w hic h  is qu icke r and easier to f i x than when re lyin g ona
*    s ep arate rootingana ly s i s.
 *
 *  -  MutableHan dle<T> i sa  non- const
 move_the JSObject_referred to by
 *_|obj| without_updating_|obj|'s location_itself._This rooting must_happen
 * regardless_of whether there are_other roots which_ensure_that the object
 * itself will not be collected.
 *
 * If |DoSomething()| cannot_trigger_a GC,_and_the_same holds for all other
_* calls made between |obj|'s_definitions and_its last uses, then no rooting
 * is_required.
_*
 * SpiderMonkey_can trigger a GC at almost any time and_in ways that are not
 *_always clear. For_example,_the_following innocuous-looking actions can
_* cause a GC: allocation of_any new GC thing; JSObject::hasProperty;
 *_JS_ReportError and friends; and ToNumber, among many_others. The following
 * dangerous-looking actions_cannot trigger a GC: js_malloc,_cx->malloc_,
 *_rt->malloc_, and friends and JS_ReportOutOfMemory.
_*
 * The_following family_of three classes_will exactly root a stack location.
_* Incorrect usage_of these classes will result in_a_compile error in_almost
_*_all cases._Therefore, it is_very_hard to_be_incorrectly rooted if you use
 *_these_classes exclusively. These classes are all templated_on the type T_of
_* the value being_rooted.
 *
 * - Rooted<T>_declares a variable of type T,_whose value_is always_rooted.
 *   Rooted<T> may be automatically coerced to a_Handle<T>, below. Rooted<T>
 *  _should be used whenever_a local_variable's_value may be_held_live across_a
 *   call which can_trigger a_GC.
 *
 * - Handle<T> is_a const reference to_a_Rooted<T>. Functions which take GC
 *_  things or values as_arguments and need to root_those_arguments_should
 *   generally_use handles for those arguments and_avoid any explicit_rooting.
 *   This has two_benefits._First, when several such functions call_each_other
 *   then redundant_rooting_of_multiple copies of the GC_thing can be avoided.
 * _ Second, if the caller does not pass a_rooted value a_compile error will be
 *___generated, which is quicker and easier to fix than when_relying on_a
 * _ separate rooting analysis.
 *
 * - MutableHandle<T> is a_non-const