Bug 1001348 - Keep system sources when certified debugging is allowed. r=vingtetun
☠☠ backed out by cf2158ae1de6 ☠ ☠
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 30 Apr 2014 10:58:00 -0400
changeset 200893 189a0e19896fc9d81874e24601475147ee2b7c9a
parent 200892 e7aeb459d7e8a622309c19106f2be9b674f445b2
child 200894 4b269ccb1a76fb2af89bdcc05fd294228410a828
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvingtetun
bugs1001348
milestone32.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 1001348 - Keep system sources when certified debugging is allowed. r=vingtetun
b2g/chrome/content/settings.js
--- a/b2g/chrome/content/settings.js
+++ b/b2g/chrome/content/settings.js
@@ -469,16 +469,23 @@ SettingsListener.observe('debugger.remot
     dump("Error while initializing devtools: " + e + "\n" + e.stack + "\n");
   }
 
 #ifdef MOZ_WIDGET_GONK
   AdbController.setRemoteDebuggerState(value != 'disabled');
 #endif
 });
 
+// If debug access to certified apps is allowed, we need to preserve system
+// sources so that they are visible in the debugger.
+let forbidCertified =
+  Services.prefs.getBoolPref('devtools.debugger.forbid-certified-apps');
+Services.prefs.setBoolPref('javascript.options.discardSystemSource',
+                           forbidCertified);
+
 // =================== Device Storage ====================
 SettingsListener.observe('device.storage.writable.name', 'sdcard', function(value) {
   if (Services.prefs.getPrefType('device.storage.writable.name') != Ci.nsIPrefBranch.PREF_STRING) {
     // We clear the pref because it used to be erroneously written as a bool
     // and we need to clear it before we can change it to have the correct type.
     Services.prefs.clearUserPref('device.storage.writable.name');
   }
   Services.prefs.setCharPref('device.storage.writable.name', value);