Bug 1233780 - Avoid CPOWs in GCLI security csp. r=jwalker
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 23 Mar 2016 11:47:05 -0500
changeset 290408 aadf5e15faf8ba88b48d16bb396f115816b8f673
parent 290407 d2518d6b0592dce706c8a7ebf663077674496c81
child 290409 5e287404e4f8fd81330cd704e42fba5e3baa5f49
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalker
bugs1233780
milestone48.0a1
Bug 1233780 - Avoid CPOWs in GCLI security csp. r=jwalker MozReview-Commit-ID: Gb6tuRL8Tcn
devtools/shared/gcli/commands/security.js
--- a/devtools/shared/gcli/commands/security.js
+++ b/devtools/shared/gcli/commands/security.js
@@ -138,35 +138,35 @@ exports.items = [
       return outPolicies;
     }
   },
   {
     item: "converter",
     from: "securityCSPInfo",
     to: "view",
     exec: function(cspInfo, context) {
-      var uri = context.environment.document.documentURI;
+      var url = context.environment.target.url;
 
       if (cspInfo.length == 0) {
         return context.createView({
           html:
             "<table class='gcli-csp-detail' cellspacing='10' valign='top'>" +
             "  <tr>" +
             "    <td> <img src='chrome://browser/content/gcli_sec_bad.svg' width='20px' /> </td> " +
-            "    <td>" + NO_CSP_ON_PAGE_MSG + " <b>" + uri + "</b></td>" +
+            "    <td>" + NO_CSP_ON_PAGE_MSG + " <b>" + url + "</b></td>" +
             "  </tr>" +
             "</table>"});
       }
 
       return context.createView({
         html:
           "<table class='gcli-csp-detail' cellspacing='10' valign='top'>" +
           // iterate all policies
           "  <tr foreach='csp in ${cspinfo}' >" +
-          "    <td> ${csp.header} <b>" + uri + "</b><br/><br/>" +
+          "    <td> ${csp.header} <b>" + url + "</b><br/><br/>" +
           "      <table class='gcli-csp-dir-detail' valign='top'>" +
           // >> iterate all directives
           "        <tr foreach='dir in ${csp.directives}' >" +
           "          <td valign='top'> ${dir.dirValue} </td>" +
           "          <td valign='top'>" +
           "            <table class='gcli-csp-src-detail' valign='top'>" +
           // >> >> iterate all srs
           "              <tr foreach='src in ${dir.dirSrc}' >" +