Closed Bug 1195105 Opened 9 years ago Closed 4 years ago

DevTools files under toolkit should not reference to chrome://browser

Categories

(DevTools :: General, defect)

38 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 912121

People

(Reporter: luoyonggang, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36 Steps to reproduce: grep chrome://browser under mozilla/toolkit directory, I found the following result and the chrome://browser URI prefix should not be appeared. Name Line Text bad_links.atom 56 <link href="chrome://browser/content/browser.js"/> test_async_history_api.js 355 "chrome://browser/content/browser.xul", test_isURIVisited.js 19 "chrome://browser/content/browser.xul?": false, test_isvisited.js 48 "chrome://browser/content/browser.xul", SocialService.jsm 550 let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); browser_thumbnails_storage.js 11 .loadSubScript("chrome://browser/content/sanitize.js", tmp); localstore.rdf 4 <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-title" localstore.rdf 9 <RDF:Description RDF:about="chrome://browser/content/browser.xul#addon-bar" localstore.rdf 19 <RDF:Description RDF:about="chrome://browser/content/browser.xul"> localstore.rdf 20 <NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/> localstore.rdf 21 <NC:persist RDF:resource="chrome://browser/content/browser.xul#addon-bar"/> localstore.rdf 22 <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-box"/> localstore.rdf 23 <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-title"/> localstore.rdf 25 <RDF:Description RDF:about="chrome://browser/content/browser.xul#main-window" test_XULStore.js 15 let browserURI = "chrome://browser/content/browser.xul"; aboutRights.xhtml 7 <!ENTITY % securityPrefsDTD SYSTEM "chrome://browser/locale/preferences/security.dtd"> aboutWebrtc.xhtml 19 <script type="text/javascript" src="chrome://browser/content/loop/shared/libs/react-0.12.2.js"></script> window_browser_drop.xul 52 [ [ { type: "text/x-moz-url", data: "chrome://browser/content/browser.xul" } ] ], test_contentAreaUtils.js 21 const CHROME_URI = "chrome://browser/content/browser.xul"; highlight.js 13 return Services.strings.createBundle("chrome://browser/locale/devtools/gclicommands.properties"); index.js 142 'chrome://browser/locale/devtools/gclicommands.properties'); l10n.js 29 'chrome://browser/locale/devtools/gclicommands.properties'); l10n.js 26 return Services.strings.createBundle('chrome://browser/locale/devtools/gcli.properties'); test_NewTabUtils.js 229 "chrome://browser/something", chrome.manifest 6 overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul chrome.manifest 5 overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul chrome.manifest 5 overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul chrome.manifest 5 overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul chrome.manifest 5 overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul chrome.manifest 5 overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul browser_openDialog.js 132 win.location != "chrome://browser/content/browser.xul") browser_tabsettings.js 77 win.location != "chrome://browser/content/browser.xul") test_ChromeManifestParser.js 39 {type: "overlay", baseURI: a1Uri, args: ["chrome://browser/content/browser.xul", "chrome://test-addon-1/content/overlay.xul"]} test_ChromeManifestParser.js 56 {type: "overlay", baseURI: a2Uri, args: ["chrome://browser/content/browser.xul", "chrome://test-addon-1/content/overlay.xul"]}, test_ChromeManifestParser.js 74 {type: "overlay", baseURI: a3Uri, args: ["chrome://browser/content/browser.xul", "chrome://test-addon-1/content/overlay.xul"]}, test_ChromeManifestParser.js 93 {type: "overlay", baseURI: a4Uri, args: ["chrome://browser/content/browser.xul", "chrome://test-addon-1/content/overlay.xul"]}, info-pages.inc.css 22 background-image: url("chrome://browser/skin/aboutNetError_info.svg"); Actual results: Reference invalid URI for toolkit
Readable search results: http://mxr.mozilla.org/mozilla-central/search?string=chrome%3A%2F%2Fbrowser&find=%2Ftoolkit&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central I don't think filing a bug like this is a good move. Most of the search hits look OK (mostly testing code), the non-obvious ones are scattered across a few components (devtools has most hits, plus a few here and there). For each component this issue should be discussed separately. I'm going to pick one component - devtools and see what happens.
Component: Untriaged → Developer Tools
Summary: files under toolkit should not reference to chrome://browser → Devtools: files under toolkit should not reference to chrome://browser
For the case of DevTools, there are matches in the following files: * /toolkit/devtools/gcli/commands/security.js * /toolkit/devtools/shared/profiler.js However, those code paths are only used in a browser context today. I agree that in principal it is incorrect for /toolkit files to reference a specific application. For DevTools, this would only become important if non-Firefox wants to display our front end UI. Keeping the bug since that we may eventually support such a goal. I would suggest making separate bugs to report this issue outside of DevTools (if you wish to do so).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Devtools: files under toolkit should not reference to chrome://browser → DevTools files under toolkit should not reference to chrome://browser
OK, gotcha, I was burden when compiled it into omni.jar and reporting error. And if 912121 are fixed, then this won't be a problem anymore:) I would take of it.
Product: Firefox → DevTools

Alex, is this still valid report?

Flags: needinfo?(poirot.alex)

I think bug 912121 addressed most issues. If not, a new bug with updated issues should be opened.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(poirot.alex)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.