From e58c1b171c78df1e824e782326d296b91e3b40fc Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 14 Aug 2019 14:47:42 -0700 Subject: [PATCH] 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testing/specialpowers/content/SpecialPowersAPI.jsm b/testing/specialpowers/content/SpecialPowersAPI.jsm index 7f8555294814..3e5aa07777c2 100644 --- a/testing/specialpowers/content/SpecialPowersAPI.jsm +++ b/testing/specialpowers/content/SpecialPowersAPI.jsm @@ -161,6 +161,11 @@ class SpecialPowersAPI extends JSWindowActorChild { this._extensionListeners = null; } + // Hack around devtools sometimes trying to JSON stringify us. + toJSON() { + return {}; + } + receiveMessage(message) { switch (message.name) { case "Assert":