Граф коммитов

90 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kingston 3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

Differential Revision: https://phabricator.services.mozilla.com/D16885

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Kris Maglione e930b89c34 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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Nika Layzell 53c6040388 Bug 1467223 - Part 3: Support uncached resources by using a redirectTo-like API for process swaps in necko, r=valentin,mayhemer
With the old process selector service implementation, non-cached loads
would skip the call into the process selector.

This implementation piggybacks atop the existing 'redirectTo' mechanism.
This is unfortunately not the perfect system for catching these loads,
as it doesn't provide an opportunity for performing a final process
switch before redirecting to a non-http channel. In addition, it doesn't
provide indication that a redirect is going to happen, causing
potentially unnecessary process switches.

Not all places where 'redirectTo' is supported use this mechanism. This
process switching mechanism is only checked in situations after
http-on-examine-response.

Potential future changes include:

 1. Moving these checks closer to the real 'OnStartRequest' call (e.g.
    in ContinueProcessNormal + ContinueOnStartRequest3). This would mean
    that loads other than the final load will not cause process swaps.

 2. Adding a callback before a redirect is performed, passing in the new
    channel, and allowing modifications to be made. This would allow
    performing a process swap before redirecting to a non-http(s)
    channel.

Depends on D15609

Differential Revision: https://phabricator.services.mozilla.com/D15610

--HG--
extra : moz-landing-system : lando
2019-01-23 21:19:39 +00:00
Nika Layzell be5f88174d Bug 1467223 - Part 1: Move CrossProcessRedirect Message to PContent, r=valentin
This is needed because early in a content process's lifecycle, NeckoParent may
not have been created yet. This leads to issues when trying to redirect into a
fresh process which hasn't performed network loads yet. By sending the message
over PContent, we can be sure the APIs are available.

Differential Revision: https://phabricator.services.mozilla.com/D15608

--HG--
extra : moz-landing-system : lando
2019-01-23 21:27:44 +00:00
Mark Banner a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
Valentin Gosu a2675e9878 Bug 1476996 - Implement cross process redirection in Http on the parent process r=bagder,nika
This patch builds the foundation for the ability to relocate HTTP channels from one content process to another in order to ensure that origins are properly isolated. This relocation would normally occur when the response to an HTTP request is a redirect to a different origin.
The patch merely adds the mechanism for relocating the channel, rather than the logic of doing so. This will be provided in a follow-up patch by a specialized service. Right now that functionality is mocked in the test.

How this works:
In nsHttpChannel::OnStartRequest we will query the service that decides whether we need to direct the response to another process. If so, it will return a promise that resolves to a TabParent.
When the promise resolves, in HttpChannelParentListener::TriggerCrossProcessRedirect we call NeckoParent::SendCrossProcessRedirect passing along the required information to recreate the channel in the new process. The NeckoChild in the new process will then instantiate a new channel, call ConnectParent() which creates the associated parent channel, and connects it with the existing nsHttpChannel.
A listener in the new process is then notified of the existence of the new channel. It is required to call completeRedirectSetup on the channel, passing an nsIStreamListener to the call.
We then finish the entire operation with a call to HttpChannelChild::SendCrossProcessRedirectDone which causes us to close the old HttpChannelChild in the previous process and to resume the nsHttpChannel in the main process.

Differential Revision: https://phabricator.services.mozilla.com/D2958

--HG--
rename : netwerk/test/browser/browser_cookie_sync_across_tabs.js => netwerk/test/browser/browser_cross_process_redirect.js
rename : dom/media/test/redirect.sjs => netwerk/test/browser/redirect.sjs
extra : moz-landing-system : lando
2018-09-04 20:45:22 +00:00
Gurzau Raul dfbefcc19f Backed out changeset 45605798ecfe (bug 1476996) for build bustage at netwerk/protocol/http/HttpChannelParentListener.cpp on a CLOSED TREE 2018-09-04 20:31:33 +03:00
Valentin Gosu 98ff61cc44 Bug 1476996 - Implement cross process redirection in Http on the parent process r=bagder,nika
This patch builds the foundation for the ability to relocate HTTP channels from one content process to another in order to ensure that origins are properly isolated. This relocation would normally occur when the response to an HTTP request is a redirect to a different origin.
The patch merely adds the mechanism for relocating the channel, rather than the logic of doing so. This will be provided in a follow-up patch by a specialized service. Right now that functionality is mocked in the test.

How this works:
In nsHttpChannel::OnStartRequest we will query the service that decides whether we need to direct the response to another process. If so, it will return a promise that resolves to a TabParent.
When the promise resolves, in HttpChannelParentListener::TriggerCrossProcessRedirect we call NeckoParent::SendCrossProcessRedirect passing along the required information to recreate the channel in the new process. The NeckoChild in the new process will then instantiate a new channel, call ConnectParent() which creates the associated parent channel, and connects it with the existing nsHttpChannel.
A listener in the new process is then notified of the existence of the new channel. It is required to call completeRedirectSetup on the channel, passing an nsIStreamListener to the call.
We then finish the entire operation with a call to HttpChannelChild::SendCrossProcessRedirectDone which causes us to close the old HttpChannelChild in the previous process and to resume the nsHttpChannel in the main process.

Differential Revision: https://phabricator.services.mozilla.com/D2958

--HG--
rename : netwerk/test/browser/browser_cookie_sync_across_tabs.js => netwerk/test/browser/browser_cross_process_redirect.js
rename : dom/media/test/redirect.sjs => netwerk/test/browser/redirect.sjs
extra : moz-landing-system : lando
2018-09-04 16:40:57 +00:00
Kris Maglione 356dd0de4a Bug 1484466: Part 3a - Update remaining XPCOMUtils.generateQI callers to use ChromeUtils. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3709

--HG--
extra : rebase_source : 650545d3e58ab92821a9ea2097793cca5996d5b3
2018-08-18 12:44:57 -07:00
Kris Maglione 031076f2f3 Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : source : fcfb99baa0f0fb60a7c420a712c6ae7c72576871
extra : histedit_source : 5be9b7b29a52a4b8376ee0bdfc5c08b12e3c775a
2018-05-21 16:58:23 -07:00
Kris Maglione 02ba563399 Bug 1463016: Part 5 - Add domWindow property to DocShellTreeItem and update callers to use it. r=nika
MozReview-Commit-ID: FRRAdxLHRtG

--HG--
extra : source : 0d69b4fb1ed43751cfcbc0b4f2fe3b6a49bc0494
extra : histedit_source : d0ce31513ffaae2fd7f01f6567a97b6d2d96b797%2Cfff837de7a00fa90809d2c3e755097180dfd56d8
2018-05-20 18:10:16 -07:00
Narcis Beleuzu 561ccb2ceb Backed out 2 changesets (bug 1463016, bug 1463291) for geckoview failures
Backed out changeset fcfb99baa0f0 (bug 1463291)
Backed out changeset 0d69b4fb1ed4 (bug 1463016)
2018-07-29 03:55:23 +03:00
Kris Maglione cb1ee1e34d Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : rebase_source : a13c59d1a5ed000187c7fd8e7339408ad6e2dee6
2018-05-21 16:58:23 -07:00
Kris Maglione 636f1839e5 Bug 1463016: Part 5 - Add domWindow property to DocShellTreeItem and update callers to use it. r=nika
MozReview-Commit-ID: FRRAdxLHRtG

--HG--
extra : rebase_source : 36565ef5e74360aad14062005e5bdab2939e888b
2018-05-20 18:10:16 -07:00
Tarek Ziadé 8533ddcaac Bug 1472718 - Convert ChromeUtils.requestIOActivity to a Promise - r=baku,valentin
Changes:

- The API now returns a Promise containing a sequence of IOActivityData dictionnaries.
- All the code related to notifications and XPCOM is removed.
- The counters are no longer reset to 0 when the API is called

MozReview-Commit-ID: 7J2EgFqDgf

--HG--
extra : rebase_source : eb7dc3e0921b12bbb3715a90863dc8e2a60c1c09
2018-07-06 13:43:08 +02:00
Margareta Eliza Balazs 4ee26c6e5e Backed out changeset c22aa9571139 (bug 1472718) for failures in browser/browser_test_io_activity.js on a CLOSED TREE 2018-07-06 11:04:39 +03:00
Tarek Ziadé 12c531f562 Bug 1472718 - Convert ChromeUtils.requestIOActivity to a Promise - r=baku,valentin
Changes:

- The API now returns a Promise containing a sequence of IOActivityData dictionnaries.
- All the code related to notifications and XPCOM is removed.
- The counters are no longer reset to 0 when the API is called

MozReview-Commit-ID: 7J2EgFqDgf

--HG--
extra : rebase_source : 4e16640a3f52fd7c042687471153971a66158623
2018-07-06 02:10:33 +02:00
Tarek Ziadé 7158cbfa29 Bug 1470073 - Make IOActivityMonitor timer optional - r=valentin
- Introduced the io.activity.enabled pref, so IOActivityMonitor can run without a timer
- Added IOActivityMonitor::NotifyActivities() to trigger notifications manually
- Added ChromeUtils.requestIOActivity() so we can trigger it via JS

MozReview-Commit-ID: 9JA2rLaM496

--HG--
extra : rebase_source : e473a7b0ec7c231ab321846c5ddcc4d6a88d7245
2018-06-26 10:43:16 +02:00
arthur.iakab 05cc8bb814 Backed out changeset b5e89c1b4e8c (bug 1470073) for failing browser chrome tests on browser_test_io_activity.js on a CLOSED TREE 2018-06-26 04:10:45 +03:00
Tarek Ziadé 0f643a27fd Bug 1470073 - Make IOActivityMonitor timer optional - r=valentin
- Introduced the io.activity.enabled pref, so IOActivityMonitor can run without a timer
- Added IOActivityMonitor::NotifyActivities() to trigger notifications manually
- Added ChromeUtils.requestIOActivity() so we can trigger it via JS

MozReview-Commit-ID: 9JA2rLaM496

--HG--
extra : rebase_source : 0a92195b6b8314383c63de4b2bb1dfe033c40e9f
2018-06-25 18:32:22 +02:00
Tarek Ziadé 2ad736aa2e Bug 1447931 - NetworkActivity becomes IOActivity - r=baku,mak,valentin
Generalizes NetworkActivity so it can be used for sockets but also disk files.
The host/port data becomes a single location string prefixed with socket://
or file:// and we're not using the FD as the identifier anymore.

IOActivityMonitor is now used in three places:

- nsFileStreams for plain files
- TelemetryVFS for sqlite files
- nsSocketTransport & nsUDPSocket for UDP & TCP sockets

MozReview-Commit-ID: GNu5o400PaV

--HG--
rename : netwerk/base/NetworkActivityMonitor.cpp => netwerk/base/IOActivityMonitor.cpp
rename : netwerk/base/NetworkActivityMonitor.h => netwerk/base/IOActivityMonitor.h
rename : netwerk/base/nsINetworkActivityData.idl => netwerk/base/nsIIOActivityData.idl
extra : rebase_source : 55a1c51b261ffbe16f88671d55445d1b0d9106b6
2018-06-12 13:22:50 -07:00
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Valentin Gosu 8f345870cc Bug 1455970 - Write test for cookies being synced across tabs r=Ehsan
Adds a test for code landed in bug 1450199.
Opens two tabs in different processes then sets cookies in one followed by checking the value in the other.

MozReview-Commit-ID: 605k68Kl7nA

--HG--
extra : rebase_source : 4efc6cf95d45b13ecbf50e51ce3134d87990fcbd
2018-04-22 17:35:20 +02:00
Tooru Fujisawa 1adba8c1fc Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
Florian Quèze c714053d73 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
Kris Maglione 918ed6c474 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 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 6476f95b13 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb 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 c276bb9375 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

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Valentin Gosu f943b98a02 Bug 1426501 - Change JS code to use nsIURIMutator instead of the nsIURI.spec setter r=mayhemer
MozReview-Commit-ID: FI6WrsQT2ke

--HG--
extra : rebase_source : 2b286c47c19ebd112a0c47fbe0a4c23bdb04755f
2018-01-08 15:20:29 +01:00
Gijs Kruitbosch ffc0ed12d2 Bug 1425363 - remove onWindowTitleChanged given that nobody uses it, r=bgrins
MozReview-Commit-ID: ALslAwZo4K9

--HG--
extra : rebase_source : ca1add0015eea86128c0c5f209252ebb6a228998
2017-12-14 21:55:44 -06:00
Joel Maher 50a371672c Bug 1370783 - Disable netwerk/test/browser/browser_child_resource.js on debug for frequent failures. r=me, a=test-only 2017-09-19 12:15:11 -04:00
Andrew Halberstadt ef2417d716 Bug 1385356 - Skip browser_tabicon_after_bg_tab_crash.js and browser_child_resources.js if crashreporter is disabled, r=mccr8
These tests use BrowserTestUtils.crashBrowser() and fail with ASan enabled.

MozReview-Commit-ID: CpkldaKouzD

--HG--
extra : rebase_source : 02c4c0c13e7ab3ba144b2922b0cc54913daa6ab9
2017-07-28 14:47:00 -04:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Gabriele Svelto 3148018ed7 Bug 1359326 - Run the minidump analyzer directly from the CrashService code; r=bsmedberg
This patch removes the C++ code used to run the minidump analyzer when a
content process crashes, and replaces it with JS code within the CrashService
object. This removes the need for a separate shutdown blocker in C++ code and
allows end-to-end testing of the crash service functionality. Additionally
the exception handler code can be simplified since it's now only used to run
the crash reporter client.

The test added to test_crash_service.js covers computing the minidump SHA256
hash (bug 1322611) and of the minidump analyzer itself (bug 1280477).

MozReview-Commit-ID: LO5w839NHev
2017-05-11 14:03:50 +02:00
Mike Hommey 80d716afe1 Bug 1367583 - Add a unit test for links in resource:// listings. r=mossop
--HG--
extra : rebase_source : d18a21ae51cd135f798477489e902ea7431f1f1f
2017-05-25 10:54:01 +09:00
Ryan VanderMeulen 91260e02d0 Backed out changeset 8f26ad528120 (bug 1367583) for browser_resource_navigation.js failures on a CLOSED TREE. 2017-05-25 18:17:42 -04:00
Mike Hommey ef39029dde Bug 1367583 - Add a unit test for links in resource:// listings. r=mossop
--HG--
extra : rebase_source : 63bd1087d6ecd5b1eaaf2f604ad79ba96022acb6
2017-05-25 10:54:01 +09:00
Christoph Kerschbaumer e4f38c8d7c Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
Florian Queze 4c6a68d1c9 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst 159215e6f4 Backed out changeset 18d45aa984d6 (bug 1355161) 2017-04-14 23:39:23 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Florian Queze a363fb8c8b Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Blake Kaplan 59c1540717 Bug 1346286 - Remove CPOWs from browser_child_resource.js. r=Gijs
MozReview-Commit-ID: 9GXn1snauxt

--HG--
extra : rebase_source : 3bbb4e973445ff74626f6c04e6e4f52be8704516
2017-03-09 17:18:09 -08:00
Gijs Kruitbosch 62b73b45c2 Bug 1335272 - add barebones functional test for about:cache, r=ckerschb
MozReview-Commit-ID: 5hlxfmYGgDa

--HG--
extra : rebase_source : f685aeb462fae3d42ffcc1df36af44eef94612f1
2017-02-02 15:40:03 +00:00
Florian Quèze 0e0865f4fc Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
Kris Maglione 440d6fcd02 Bug 1305162: Part 1a - Separate nsIMIMEInputStream headers from stream data. r=dragana
MozReview-Commit-ID: F1qZCBWUNRG

--HG--
extra : rebase_source : 7a4fdab3e4843a042a3d1101c5e58a6bb556ef7a
extra : source : de131f7c1fc1f60db42509aea646ef4540e6c5fe
2017-01-20 15:43:07 -08:00