Bug 1572898: Follow-up: Hack around devtools trying to JSON stringify SpecialPowers. r=bustage,test-only
authorKris Maglione <maglione.k@gmail.com>
Wed, 14 Aug 2019 14:47:42 -0700
changeset 488082 fe2f282a7d07f4982b000ab1c4977cc48b1d7257
parent 488081 504f777152d8c38d2ac11577da8b1cf84fd8524d
child 488083 d65454c57706101473fc1a6e78c20d63c44cff9b
push id36435
push usercbrindusan@mozilla.com
push dateThu, 15 Aug 2019 09:46:49 +0000
treeherdermozilla-central@0db07ff50ab5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage, test-only
bugs1572898
milestone70.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 1572898: Follow-up: Hack around devtools trying to JSON stringify SpecialPowers. r=bustage,test-only MANUAL PUSH: Bustage fix.
testing/specialpowers/content/SpecialPowersAPI.jsm
--- a/testing/specialpowers/content/SpecialPowersAPI.jsm
+++ b/testing/specialpowers/content/SpecialPowersAPI.jsm
@@ -156,16 +156,21 @@ class SpecialPowersAPI extends JSWindowA
     this._xpcomabi = null;
     this._os = null;
     this._pu = null;
 
     this._nextExtensionID = 0;
     this._extensionListeners = null;
   }
 
+  // Hack around devtools sometimes trying to JSON stringify us.
+  toJSON() {
+    return {};
+  }
+
   receiveMessage(message) {
     switch (message.name) {
       case "Assert":
         {
           // An assertion has been done in a mochitest chrome script
           let { name, passed, stack, diag } = message.data;
 
           let SimpleTest =