Bug 1500267 - [SMDOC] Brain transplants comment r=tcampbell
authorMatthew Gaudet <mgaudet@mozilla.com>
Fri, 19 Oct 2018 15:12:05 +0000
changeset 500667 59d216896c04522d674c86e16ce59658973dfab4
parent 500666 9788a3095675249e279b46b1dfee0246aec4fcc3
child 500668 cb06428d3b23a3943d08086cfd427387ea400bb3
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1500267
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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