Bug 1500267 - [SMDOC] Brain transplants comment r=tcampbell
authorMatthew Gaudet <mgaudet@mozilla.com>
Fri, 19 Oct 2018 15:12:05 +0000
changeset 490523 59d216896c04522d674c86e16ce59658973dfab4
parent 490522 9788a3095675249e279b46b1dfee0246aec4fcc3
child 490524 cb06428d3b23a3943d08086cfd427387ea400bb3
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerstcampbell
bugs1500267
milestone64.0a1
Bug 1500267 - [SMDOC] Brain transplants comment r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D9164
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -773,17 +773,19 @@ ReleaseAssertObjectHasNoWrappers(JSConte
     for (CompartmentsIter c(cx->runtime()); !c.done(); c.next()) {
         if (c->lookupWrapper(origv)) {
             MOZ_CRASH("wrapper found for target object");
         }
     }
 }
 
 /*
- * Brain transplants. Not for beginners or the squeamish.
+ * [SMDOC] Brain transplants.
+ *
+ * Not for beginners or the squeamish.
  *
  * Sometimes a web spec requires us to transplant an object from one
  * compartment to another, like when a DOM node is inserted into a document in
  * another window and thus gets "adopted". We cannot literally change the
  * `.compartment()` of a `JSObject`; that would break the compartment
  * invariants. However, as usual, we have a workaround using wrappers.
  *
  * Of all the wrapper-based workarounds we do, it's safe to say this is the