If in a plain mochitest I do var rope = SpecialPowers.Cu.getJSTestingFunctions().newRope(t.head, t.tail); var encoded = (new TextEncoder()).encode(rope); the encode() method doesn't see the rope. Instead, the call to encode() sees a linear string that was materialized by a copy in a cross-compartment wrapper.
Does SpecialPowers always introduce a compartment boundary in a plain mochitest? In what type of test does SpecialPowers.Cu.getJSTestingFunctions().newRope() actually return a rope within the calling compartment such that passing the rope to a WebIDL API really makes the rope enter the WebIDL bindings instead of getting intercepted by a cross-compartment wrapper first? Alternatively: What kind of string lengths should I use with normal JS string concatenation to be sure that I get a rope instead of the right operand getting copied into an extensible left operand? -- Henri Sivonen hsivo...@mozilla.com _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform