Backed out changeset d828e2c01a60 (bug 1402066) for frequently failing modified xpcshell test toolkit/components/extensions/test/xpcshell/test_ext_redirects.js on Android 4.3 debug. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 26 Sep 2017 11:38:33 +0200
changeset 670379 6a9d008002efc9044416d5fff5713f899c954ebb
parent 670378 998dd0100a61ba5ceafe8fe27b13753b3537a8bd
child 670380 feea85fc836b2d359965563927d029a94d2c10db
child 670510 291c22379f901b632db909bfb05eb15c4d79b270
child 670554 f41e4ba17689198d1f697af30ef3f519fa116105
push id81612
push userbmo:dharvey@mozilla.com
push dateTue, 26 Sep 2017 10:16:26 +0000
reviewersbackout
bugs1402066
milestone58.0a1
backs outd828e2c01a60febf598dcc544da266042c74731b
Backed out changeset d828e2c01a60 (bug 1402066) for frequently failing modified xpcshell test toolkit/components/extensions/test/xpcshell/test_ext_redirects.js on Android 4.3 debug. r=backout
toolkit/components/extensions/Schemas.jsm
toolkit/components/extensions/extension-process-script.js
--- a/toolkit/components/extensions/Schemas.jsm
+++ b/toolkit/components/extensions/Schemas.jsm
@@ -2713,35 +2713,26 @@ this.Schemas = {
 
       Services.cpmm.addMessageListener("Schema:Add", this);
     }
 
     this.flushSchemas();
   },
 
   receiveMessage(msg) {
-    let {data} = msg;
     switch (msg.name) {
       case "Schema:Add":
-        // If we're given a Map, the ordering of the initial items
-        // matters, so swap with our current data to make sure its
-        // entries appear first.
-        if (typeof data.get === "function") {
-          // Create a new Map so we're sure it's in the same compartment.
-          [this.schemaJSON, data] = [new Map(data), this.schemaJSON];
-        }
-
-        for (let [url, schema] of data) {
+        for (let [url, schema] of msg.data) {
           this.schemaJSON.set(url, schema);
         }
         this.flushSchemas();
         break;
 
       case "Schema:Delete":
-        this.schemaJSON.delete(data.url);
+        this.schemaJSON.delete(msg.data.url);
         this.flushSchemas();
         break;
     }
   },
 
   _needFlush: true,
   flushSchemas() {
     if (this._needFlush) {
--- a/toolkit/components/extensions/extension-process-script.js
+++ b/toolkit/components/extensions/extension-process-script.js
@@ -375,26 +375,16 @@ ExtensionManager = {
 
       case "Extension:FlushJarCache": {
         ExtensionUtils.flushJarCache(data.path);
         Services.cpmm.sendAsyncMessage("Extension:FlushJarCacheComplete");
         break;
       }
 
       case "Schema:Add": {
-        // If we're given a Map, the ordering of the initial items
-        // matters, so swap with our current data to make sure its
-        // entries appear first.
-        if (typeof data.get === "function") {
-          [this.schemaJSON, data] = [data, this.schemaJSON];
-
-          Services.cpmm.initialProcessData["Extension:Schemas"] =
-            this.schemaJSON;
-        }
-
         for (let [url, schema] of data) {
           this.schemaJSON.set(url, schema);
         }
         break;
       }
     }
   },
 };