Bug 1085446 - Allow chrome and about sources in tabs. r=past
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 01 Dec 2014 22:03:51 -0800
changeset 218275 332134580365b24196a6a57999c9fc7ebdf45c6a
parent 218222 83af98c110b7ba320eb96736363c10873e02f73e
child 218276 bd30fe30ca9c6cc76227faa43451add8a5c58609
push id27926
push usercbook@mozilla.com
push dateWed, 03 Dec 2014 12:39:10 +0000
treeherdermozilla-central@a9fc46355661 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs1085446
milestone37.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 1085446 - Allow chrome and about sources in tabs. r=past
toolkit/devtools/server/actors/script.js
--- a/toolkit/devtools/server/actors/script.js
+++ b/toolkit/devtools/server/actors/script.js
@@ -2116,31 +2116,17 @@ ThreadActor.prototype = {
    * Check if scripts from the provided source URL are allowed to be stored in
    * the cache.
    *
    * @param aSourceUrl String
    *        The url of the script's source that will be stored.
    * @returns true, if the script can be added, false otherwise.
    */
   _allowSource: function (aSource) {
-    let url = getSourceURL(aSource);
-
-    if (isHiddenSource(aSource)) {
-      return false;
-    }
-
-    // Ignore XBL bindings for content debugging.
-    if (url && url.indexOf("chrome://") == 0) {
-      return false;
-    }
-    // Ignore about:* pages for content debugging.
-    if (url && url.indexOf("about:") == 0) {
-      return false;
-    }
-    return true;
+    return !isHiddenSource(aSource);
   },
 
   /**
    * Restore any pre-existing breakpoints to the scripts that we have access to.
    */
   _restoreBreakpoints: function () {
     if (this.breakpointStore.size === 0) {
       return;
@@ -5196,26 +5182,17 @@ function ChromeDebuggerActor(aConnection
 }
 
 ChromeDebuggerActor.prototype = Object.create(ThreadActor.prototype);
 
 update(ChromeDebuggerActor.prototype, {
   constructor: ChromeDebuggerActor,
 
   // A constant prefix that will be used to form the actor ID by the server.
-  actorPrefix: "chromeDebugger",
-
-  /**
-   * Override the eligibility check for scripts and sources to make sure every
-   * script and source with a URL is stored when debugging chrome.
-   */
-
-  _allowSource: function(aSource) {
-    return !isHiddenSource(aSource);
-  }
+  actorPrefix: "chromeDebugger"
 });
 
 exports.ChromeDebuggerActor = ChromeDebuggerActor;
 
 /**
  * Creates an actor for handling add-on debugging. AddonThreadActor is
  * a thin wrapper over ThreadActor.
  *