Commit Graph

179 Commits

Author SHA1 Message Date
Kris Maglione
856fa07b17 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750
2019-01-17 10:18:31 -08:00
Felipe Gomes
9db5cb1217 Bug 1496840 - Add a browsingContext getter to the browser element. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D7935
2018-11-12 17:57:48 +00:00
Gijs Kruitbosch
af9a190406 Bug 1496360 - make BrowserWindowTracker and its deps use the docshell to obtain an outerWindowID, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D11003
2018-11-06 09:48:46 +00:00
Kris Maglione
d59e6cc856 Bug 1472491: Part 5η - Add BrowserChild actor. r=florian f=mconley
MozReview-Commit-ID: D1d4hFGNKXj
2018-07-30 10:52:55 -07:00
Kris Maglione
bd7613d4ce Bug 1472491: Part 5μ - Add WebNavigationChild actor. r=mconley
MozReview-Commit-ID: 3AiCuNfMenb
2018-07-30 12:55:22 -07:00
Kris Maglione
47ad29974d Bug 1472491: Part 5ζ - Add ControllersChild actor. r=mconley
MozReview-Commit-ID: 2u6ayRoHvIh
2018-07-30 10:52:29 -07:00
Kris Maglione
ca0789b6d3 Bug 1472491: Part 5t - Add ThumbnailsChild actor. r=Mossop
MozReview-Commit-ID: 31V11KaJj4D
2018-07-29 22:25:48 -07:00
Kris Maglione
87f08c3e60 Bug 1472491: Part 5s - Add ZoomChild actor. r=mconley
MozReview-Commit-ID: 9vTa1PbTh5t
2018-07-29 22:18:52 -07:00
Kris Maglione
609e447315 Bug 1479312: Move WebNavigation and WebProgress child listeners to JSMs. r=felipe
MozReview-Commit-ID: B2b4QXge7S4
2018-07-29 17:08:58 -07:00
Cosmin Sabou
073139a2ec Backed out 12 changesets (bug 1479309, bug 1479312, bug 1479313, bug 1479310, bug 1479235, bug 1479945, bug 1479241, bug 1479318) for causing a big performance regression on OS X. a=backout
Backed out changeset 915862a355e9 (bug 1479318)
Backed out changeset f150e62dcbbd (bug 1479241)
Backed out changeset a68daa762119 (bug 1479312)
Backed out changeset 2a5aa9de1fd9 (bug 1479945)
Backed out changeset 163276881d35 (bug 1479945)
Backed out changeset 20a1a11b4d0b (bug 1479945)
Backed out changeset ca43bd11f431 (bug 1479945)
Backed out changeset 71700b368132 (bug 1479945)
Backed out changeset f5d647fae973 (bug 1479313)
Backed out changeset 3583823171de (bug 1479310)
Backed out changeset 2d46e1fe3121 (bug 1479309)
Backed out changeset 8f9c9580f687 (bug 1479235)
2018-08-07 17:30:52 +03:00
Kris Maglione
c7a4e2e048 Bug 1479312: Move WebNavigation and WebProgress child listeners to JSMs. r=felipe
MozReview-Commit-ID: B2b4QXge7S4
2018-07-29 17:08:58 -07:00
Andreea Pavel
9e044db5d7 Backed out changeset d403426d1dcd (bug 1479312) for failing eslint at builds/worker/checkouts/gecko/toolkit/modules/WebProgressChild.jsm on a CLOSED TREE 2018-08-02 02:06:43 +03:00
Kris Maglione
31a3c331ff Bug 1479312: Move WebNavigation and WebProgress child listeners to JSMs. r=felipe
MozReview-Commit-ID: B2b4QXge7S4
2018-07-29 17:08:58 -07:00
Dipen Patel
54148735a5 Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL
2018-07-13 11:48:55 -07:00
Andreea Pavel
f6396a98eb Backed out changeset c235d6f86c22 (bug 1475647) for breaking firefox ui at testing/firefox-ui/tests/puppeteer/test_tabbar.py on a CLOSED TREE 2018-07-25 19:34:58 +03:00
Dipen Patel
b987e41d2e Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL
2018-07-13 11:48:55 -07:00
Boris Zbarsky
1b419c917c Bug 1476145 part 6. Stop using getInterface(nsIDOMWindowUtils) in toolkit. r=mossop
This is not quite a mechanical change, because some places have a .top or
whatnot snuck in there, so please review carefully!
2018-07-24 19:47:42 -04:00
Kris Maglione
6d2169d69a Bug 1474155: Part 5 - Null out frame script singleton init methods after they're called. r=mconley
Believe it or not, the memory these references hold alive is significant.
Nulling them out saves 5-10K per process.

MozReview-Commit-ID: JONjE48yE8I
2018-07-07 20:49:30 -07:00
Kris Maglione
582a21b473 Bug 1456035: Part 5 - Convert manual QueryInterface to ChromeUtils.generateQI. r=mccr8
Manually-implemented QueryInterface functions don't benefit from the
MozQueryInterface optimizaions, and a lot of them are in hot code, and
implement a large number of interfaces.

MozReview-Commit-ID: 8OzglraowZt
2018-04-23 12:58:34 -07:00
Kris Maglione
4d631d9048 Bug 1443983: Part 2 - Remove remaining interpositions. r=mconley
MozReview-Commit-ID: AHwNsBB7OAQ
2018-03-07 18:10:24 -08:00
Florian Quèze
f6add2cafd Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Valentin Gosu
b9160f5ce8 Bug 1433958 - Change code that sets nsIURI.userPass to use nsIURIMutator r=mayhemer
* Code in XMLHttpRequestMainThread is converted to set the username and password individually. This is because when the parameters are empty, it ended up calling SetUserPass(":") which always returns an error.

MozReview-Commit-ID: 3cK5HeyzjFE
2018-02-26 20:43:46 +01:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
Eugen Sawin
badf52df48 Bug 1423229 - [1.3] Enable nsIClassifiedChannel interface in onSecurityChange callbacks. r=mconley 2018-02-05 22:10:34 +01:00
Andreea Pavel
f9f17dd6ff Backed out 6 changesets (bug 1423229) for failing browser chrome at browser/base/content/test/siteIdentity/browser_bug1045809.js and firefox functional at testing/firefox-ui/tests/functional/security/test_mixed_script_content_blocking.py TestMixedScriptContentBlocking.test_mixed_content_page and mochitest devtools at devtools/client/webconsole/test/browser_webconsole_block_mixedcontent_securityerrors.js on a CLOSED TREE
Backed out changeset 2ee49f44e617 (bug 1423229)
Backed out changeset 30d1575f5b16 (bug 1423229)
Backed out changeset 39d76cb8c73e (bug 1423229)
Backed out changeset 8ff1f049ac96 (bug 1423229)
Backed out changeset c86887b7f327 (bug 1423229)
Backed out changeset 5417194f3778 (bug 1423229)
2018-02-03 01:12:45 +02:00
Eugen Sawin
2fa64498c9 Bug 1423229 - [1.1] Enable nsIClassifiedChannel interface in onSecurityChange callbacks. r=mconley 2018-02-02 22:36:08 +01:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Bill McCloskey
65964675c9 Bug 1412456 - Send document CPOW as well as window CPOW (r=mconley)
Currently, if you try to use contentDocumentAsCPOW, you'll get an
exception saying that browser code is not allowed to use CPOWs. That's
because we cleverly tried to get the CPOW via
contentWindowAsCPOW.document. However, this property access happens
inside remote-browser.xul, where CPOWs are forbidden. So it doesn't
work.

MozReview-Commit-ID: ANWad4tvGpU
2017-12-07 12:55:19 -08:00
Andreea Pavel
26ac595cba Backed out 9 changesets (bug 1412456) for crashing talos g2 and unexpected network connections in browser-chrome's browser_searchEngine_behaviors.js r=backout a=backout on a CLOSED TREE
Backed out changeset 0c01a98f4fd5 (bug 1412456)
Backed out changeset 27077db47231 (bug 1412456)
Backed out changeset f35ec2a884f8 (bug 1412456)
Backed out changeset 602b30ac3c69 (bug 1412456)
Backed out changeset b1ff1050c589 (bug 1412456)
Backed out changeset f100d953f9eb (bug 1412456)
Backed out changeset d85af60fe259 (bug 1412456)
Backed out changeset 736f38486832 (bug 1412456)
Backed out changeset 13a637602dc2 (bug 1412456)
2017-12-07 12:20:21 +02:00
Bill McCloskey
f179983e05 Bug 1412456 - Send document CPOW as well as window CPOW (r=mconley)
Currently, if you try to use contentDocumentAsCPOW, you'll get an
exception saying that browser code is not allowed to use CPOWs. That's
because we cleverly tried to get the CPOW via
contentWindowAsCPOW.document. However, this property access happens
inside remote-browser.xul, where CPOWs are forbidden. So it doesn't
work.

MozReview-Commit-ID: ANWad4tvGpU
2017-12-06 21:16:57 -08:00
Dorel Luca
81b4b85d01 Backed out 8 changesets (bug 1412456) for ESlint failure on browser_urlbarKeepStateAcrossTabSwitches.js:13:49 r=backout on a CLOSED TREE
Backed out changeset 0e88de036c55 (bug 1412456)
Backed out changeset 49b93f807db0 (bug 1412456)
Backed out changeset 039e980b7dc6 (bug 1412456)
Backed out changeset c7698410ddbd (bug 1412456)
Backed out changeset e56a1ba26b7c (bug 1412456)
Backed out changeset 0c4506e124ac (bug 1412456)
Backed out changeset a7aec2ce903b (bug 1412456)
Backed out changeset 3e9fb71f1e8e (bug 1412456)
2017-12-07 07:09:33 +02:00
Bill McCloskey
fce93057f6 Bug 1412456 - Send document CPOW as well as window CPOW (r=mconley)
Currently, if you try to use contentDocumentAsCPOW, you'll get an
exception saying that browser code is not allowed to use CPOWs. That's
because we cleverly tried to get the CPOW via
contentWindowAsCPOW.document. However, this property access happens
inside remote-browser.xul, where CPOWs are forbidden. So it doesn't
work.

MozReview-Commit-ID: ANWad4tvGpU
2017-12-06 20:46:58 -08:00
Kevin Jones
dea86f69f6 Bug 1415918 - Allow discarding browsers that have beforeunload handlers in tabbrowser.discardBrowser. r=bz
MozReview-Commit-ID: 5KQcrOQTSpK
2017-11-24 15:14:46 +01:00
Dan Banner
5af4450327 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Gabor Krizsanits
4a1dd11be4 Bug 1336389 - Talos test for content process startup time. r=mconley 2017-09-27 18:31:53 +02:00
Kershaw Chang
01ecffb3a1 Bug 1247843 - Part 1: Add new property - contentRequestContextID. r=mconley, r=hurley 2017-09-20 20:08:00 -04:00
Sebastian Hengst
a4aea9f99c Backed out changeset 5cd2ba3bc6c4 (bug 1336389) for failing new talos test cpstartup. r=backout 2017-09-19 16:12:41 +02:00
Gabor Krizsanits
ffbab60ca5 Bug 1336389 - Talos test for content process startup time. r=mconley 2017-09-19 12:56:42 +02:00
Kirk Steuber
2041d7474c Bug 1376511 - Handle Browser:Thumbnail:CheckState during idle period r=mconley
MozReview-Commit-ID: 6n4nzCqTt0O
2017-08-08 14:59:49 -07:00
Sebastian Hengst
6ad0561291 Backed out changeset 1a3018f82800 (bug 1376511) for failing browser-chrome's browser_thumbnails_bug726727.js and browser_thumbnails_bug818225.js. r=backout 2017-08-09 19:43:23 +02:00
Kirk Steuber
9b00def52e Bug 1376511 - Handle Browser:Thumbnail:CheckState during idle period r=mconley
MozReview-Commit-ID: 6n4nzCqTt0O
2017-08-08 14:59:49 -07:00
Bill McCloskey
59c11f59f4 Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-28 13:11:59 -07:00
Carsten "Tomcat" Book
45036acc75 Merge mozilla-central to autoland 2017-07-28 09:50:36 +02:00
Carsten "Tomcat" Book
6108f96293 Backed out changeset e3e924da5d5f (bug 1383328) 2017-07-28 09:20:05 +02:00
Dão Gottwald
0d8f1a1e6e Bug 1384565 - Clean up DOMTitleChanged listener. r=billm
MozReview-Commit-ID: GFioUI3P6Hk
2017-07-26 15:18:05 +02:00
Bill McCloskey
5975cfac88 Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-25 19:52:36 -07:00