Bug 1001348 - Keep system sources when certified debugging is allowed. r=vingtetun
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 27 May 2014 17:11:34 -0700
changeset 204519 dc386dd7700eb4731fe90616b162a739214d79b8
parent 204518 c7131b6513ddfd692ec1754592f0ad108c33e6bc
child 204520 53e01347e29d8d35f46a649ed5c2d206c036a75b
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
@@ -467,16 +467,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);