Bug 1487836 - Fix innerWindowID used for the WebExtensions devtools API eval denied errors. r=jdescottes
authorLuca Greco <lgreco@mozilla.com>
Mon, 03 Sep 2018 06:29:21 +0000
changeset 434529 55570b34ff7c29a1159145007380745ea50cec4e
parent 434498 d26ec598073acc11f0f6d3bcdbc429ba0066978e
child 434530 fd75f8567ce97653176559bfedd37afd46b36d78
push id107411
push userdvarga@mozilla.com
push dateMon, 03 Sep 2018 22:07:41 +0000
treeherdermozilla-inbound@1c08b566a5c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1487836
milestone63.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 1487836 - Fix innerWindowID used for the WebExtensions devtools API eval denied errors. r=jdescottes Differential Revision: https://phabricator.services.mozilla.com/D4782
devtools/server/actors/addon/webextension-inspected-window.js
--- a/devtools/server/actors/addon/webextension-inspected-window.js
+++ b/devtools/server/actors/addon/webextension-inspected-window.js
@@ -65,17 +65,17 @@ function logAccessDeniedWarning(window, 
   // the url from window.location.href.
   const reportedURI = isSystemPrincipalWindow(window) ?
     Services.io.newURI(window.location.href) : window.document.nodePrincipal.URI;
 
   const error = Cc["@mozilla.org/scripterror;1"].createInstance(Ci.nsIScriptError);
 
   const msg = `The extension "${name}" is not allowed to access ${reportedURI.spec}`;
 
-  const innerWindowId = window.windowUtils;
+  const innerWindowId = window.windowUtils.currentInnerWindowID;
 
   const errorFlag = 0;
 
   let {url, lineNumber} = callerInfo;
 
   const callerURI = callerInfo.url && Services.io.newURI(callerInfo.url);
 
   // callerInfo.url is not the full path to the file that called the WebExtensions