Bug 797529 - Make SpecialPowers compatible with B2G compartment sharing, r=khuey
authorJonathan Griffin <jgriffin@mozilla.com>
Fri, 31 May 2013 16:58:58 -0700
changeset 134530 70b692093c94282638f722acd016ff0039207d32
parent 134529 613d6ed5ccdb86bf9d965c2bc8d4f24a708804a1
child 134531 48d63831553ff33f9ce5f352d5e249fae0a192b0
push id29253
push userjgriffin@mozilla.com
push dateMon, 10 Jun 2013 17:24:51 +0000
treeherdermozilla-inbound@48d63831553f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs797529
milestone24.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 797529 - Make SpecialPowers compatible with B2G compartment sharing, r=khuey
testing/specialpowers/components/SpecialPowersObserver.js
testing/specialpowers/content/SpecialPowersObserverAPI.js
--- a/testing/specialpowers/components/SpecialPowersObserver.js
+++ b/testing/specialpowers/components/SpecialPowersObserver.js
@@ -20,19 +20,18 @@ const CHILD_SCRIPT_API = "chrome://speci
 const CHILD_LOGGER_SCRIPT = "chrome://specialpowers/content/MozillaLogger.js"
 
 
 // Glue to add in the observer API to this object.  This allows us to share code with chrome tests
 var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
                        .getService(Components.interfaces.mozIJSSubScriptLoader);
 loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserverAPI.js");
 
-
 /* XPCOM gunk */
-function SpecialPowersObserver() {
+this.SpecialPowersObserver = function SpecialPowersObserver() {
   this._isFrameScriptLoaded = false;
   this._messageManager = Cc["@mozilla.org/globalmessagemanager;1"].
                          getService(Ci.nsIMessageBroadcaster);
 }
 
 
 SpecialPowersObserver.prototype = new SpecialPowersObserverAPI();
 
--- a/testing/specialpowers/content/SpecialPowersObserverAPI.js
+++ b/testing/specialpowers/content/SpecialPowersObserverAPI.js
@@ -11,17 +11,17 @@ function SpecialPowersException(aMsg) {
   this.message = aMsg;
   this.name = "SpecialPowersException";
 }
 
 SpecialPowersException.prototype.toString = function() {
   return this.name + ': "' + this.message + '"';
 };
 
-function SpecialPowersObserverAPI() {
+this.SpecialPowersObserverAPI = function SpecialPowersObserverAPI() {
   this._crashDumpDir = null;
   this._processCrashObserversRegistered = false;
 }
 
 function parseKeyValuePairs(text) {
   var lines = text.split('\n');
   var data = {};
   for (let i = 0; i < lines.length; i++) {