Bug 1371298 - support sticky_prefs in devtools addon prefs loader;r=bgrins draft
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 08 Jun 2017 18:19:51 +0200
changeset 591079 a3e74ac27c9ce839f31288c048a8c2e6a4bb288c
parent 591046 36635d9aa007031a3d23b30860836441f393656b
child 591080 ea167d45be864df68b39bdbf315655ad535780ce
push id62947
push userjdescottes@mozilla.com
push dateThu, 08 Jun 2017 16:21:01 +0000
reviewersbgrins
bugs1371298
milestone55.0a1
Bug 1371298 - support sticky_prefs in devtools addon prefs loader;r=bgrins MozReview-Commit-ID: BgPvk9ykdrX
devtools/bootstrap.js
--- a/devtools/bootstrap.js
+++ b/devtools/bootstrap.js
@@ -72,17 +72,17 @@ function interpretPreprocessingInstructi
       }
       ignoring = !ifMap[line];
     } else if (line.startsWith("#else")) {
       ignoring = !ignoring;
     } else if (line.startsWith("#endif")) {
       ignoring = false;
     }
 
-    let isPrefLine = /^ *pref\("([^"]+)"/.test(line);
+    let isPrefLine = /^ *(sticky_)?pref\("([^"]+)"/.test(line);
     if (continuation || (!ignoring && isPrefLine)) {
       newLines.push(line);
 
       // The call to pref(...); might span more than one line.
       continuation = !/\);/.test(line);
     }
   }
   return newLines.join("\n");