Commit Graph

4994 Commits

Author SHA1 Message Date
Ehsan Akhgari
bb7fcd9d69 Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 14:52:07 -04:00
André Bargull
ed962c63e5 Bug 1485066 - Part 8: Rename JS_EncodeString to JS_EncodeStringToLatin1. r=Waldo 2018-09-05 06:05:03 -07:00
André Bargull
e4d1d98f88 Bug 1485066 - Part 1: Remove JSAutoByteString. r=Waldo 2018-09-05 02:25:42 -07:00
Cosmin Sabou
1f0a42def4 Backed out 14 changesets (bug 1485066) for build bustages on MessageManagerFuzzer. CLOSED TREE
Backed out changeset e40f67f15bf1 (bug 1485066)
Backed out changeset f09bc4d5fdcc (bug 1485066)
Backed out changeset 939e27aa2d59 (bug 1485066)
Backed out changeset d50fcf82556c (bug 1485066)
Backed out changeset 5cbc0ae0117a (bug 1485066)
Backed out changeset 09b5382e0baf (bug 1485066)
Backed out changeset 6676e8fedcb3 (bug 1485066)
Backed out changeset 28e7e61c11ec (bug 1485066)
Backed out changeset b08b0cfc1dbe (bug 1485066)
Backed out changeset 8defc9eabfac (bug 1485066)
Backed out changeset bf167b0a3af3 (bug 1485066)
Backed out changeset 4f89260d5e30 (bug 1485066)
Backed out changeset c22fc17c9d87 (bug 1485066)
Backed out changeset d35bb63dbc1d (bug 1485066)
2018-09-05 15:54:03 +03:00
Margareta Eliza Balazs
0a38d82d7b Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-05 15:43:59 +03:00
André Bargull
89416b7fd4 Bug 1485066 - Part 8: Rename JS_EncodeString to JS_EncodeStringToLatin1. r=Waldo 2018-09-05 02:26:49 -07:00
André Bargull
775b7277cc Bug 1485066 - Part 1: Remove JSAutoByteString. r=Waldo 2018-09-05 02:25:42 -07: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
Brian Hackett
1561d566c9 Bug 1486609 - Ignore message priorities in recording/replaying processes, r=mccr8.
--HG--
extra : rebase_source : 1d74a58a6bf8ef02497bf778b0c428499a9f40d8
2018-08-31 05:34:18 -10:00
Andrea Marchesini
24005dab5f Bug 1485492 - Disable fastblocking when the user has interacted with a document, r=ehsan 2018-08-31 13:21:17 +02:00
Carl Corcoran
7da8e04c87 Bug 1467736: Add support for DllBlocklist_Shutdown;r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D4544

--HG--
extra : moz-landing-system : lando
2018-08-29 18:49:49 +00:00
Margareta Eliza Balazs
2fe43133db Merge inbound to mozilla-central. a=merge 2018-08-29 12:43:37 +03:00
Tom Ritter
7e0fefeaa0 Bug 1475566 Disable #pragma comments for MinGW Builds r=glandium
In the MinGW browser build job, we're going to use -fms-extensions,
which will tell clang to start processing these comments. Clang
cannot process them correctly (it's an upstream bug) but it doesn't
need to, because we include the libs we need in moz.build files.

So we exclude them for MinGW builds. mingw-clang gets them wrong and
mingw-gcc (which doesn't even work anymore on -central) ignored them.

In the future, with a llvm fix, we could clean up the moz.build
files and re-enable these comments.

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

--HG--
extra : moz-landing-system : lando
2018-08-29 03:50:39 +00:00
Ciure Andrei
d716a04e20 Merge inbound to mozilla-central. a=merge 2018-08-29 00:58:21 +03:00
Alex Gaynor
5bf3453bc2 Bug 1486547 - renamed the mState field on generated protocol classes; r=froydnj
There's also a field named mState on IProtocol, and this reduces confusion.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 18:20:17 +00:00
Alex Gaynor
9b811a260c Bug 1485762 - when deserializing a shmem in IPC, error if the ID doesn't point to a valid shmem segment; r=jld
Differential Revision: https://phabricator.services.mozilla.com/D4141

--HG--
extra : moz-landing-system : lando
2018-08-24 20:25:42 +00:00
Jeff Walden
64fceacad0 Bug 1486577 - Don't #include "js/CompilationAndEvaluation.h" in jsapi.h, minimizing the scope of that header and reducing translation-unit size of anything that needs JSAPI but doesn't need to compile/evaluate JavaScript. r=jandem
--HG--
extra : rebase_source : cd9a8becc15477bc5e24408159d4f061ec81c8b2
2018-08-24 22:51:49 -05:00
Jeff Walden
4bdf4a3614 Bug 1486577 - Don't #include js/SourceBufferHolder.h in jsapi.h, and instead require users to do so -- a minor translation-unit size improvement for anyone who never has to use SourceBufferHolder other than by reference. r=jandem
--HG--
extra : rebase_source : df47aba0c7dac3fe80ab6ea1b9a34c7acc54850d
2018-08-24 21:01:58 -05:00
Nathan Froyd
29a5f5b36b Bug 1485696 - add aarch64 windows support to ipc's build_config.h; r=jld 2018-08-23 13:27:57 -04:00
Nathan Froyd
5c033bee02 Bug 1486039 - use a more-portable idiom for pausing in SpinEvent::Wait; r=aklotz
YieldProcessor is apparently defined to do the same thing on x86 as our
custom macros, but includes implementations for non-x86 processors.
2018-08-28 09:27:57 -04:00
Cosmin Sabou
d141575366 Merge mozilla-central to mozilla-inbound. a=merge 2018-08-27 19:00:38 +03:00
Nathan Froyd
3eab353d3f Bug 1480732 - make ipc/'s atomicops.h work on aarch64 windows; r=jld
I'm not entirely sure how this works on x86-64 Windows, which also uses
a #define for MemoryBarrier...I think something about intrinsics.
2018-08-27 09:31:28 -04:00
Andreas Pehrson
84013bba14 Bug 1478575 - Unify CamerasChild shutdown paths. r=gcp 2018-08-20 10:44:49 +02:00
Jed Davis
4a8426acf0 Bug 1478849. r=mccr8 2018-08-21 15:37:42 -06:00
Dorel Luca
07c6e76122 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-21 12:54:24 +03:00
Alex Gaynor
019b59f8b5 Bug 1483309 - the IPC libFuzzer integration can now generated shared memory segments; r=jld,posidron
Uses the input bytes as metadata + data for shared memory segments.

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

--HG--
extra : moz-landing-system : lando
2018-08-20 18:46:05 +00:00
Jeff Walden
ffd93ba761 Bug 1033916 - Move JSAutoByteString out of jsapi.h into js/public/AutoByteString.h, incidentally breaking the jsfriendapi.h -> jsapi.h dependency. r=jandem
--HG--
extra : rebase_source : d85baf9b28e632db5669aa3d056cc9744686f5c8
2018-08-20 07:46:08 -07:00
Aaron Klotz
9777f6b196 Bug 1484758: Add WinBuiltinAnyPackageSid to parent process COM ACL; r=mhowell
--HG--
extra : amend_source : f7792014b45f8963926d014c34c58a0d7b8d8d95
2018-08-20 11:03:45 -06:00
Jan Varga
5733cbbbd3 Bug 1361330 - Part 4: Core implementation; r=asuth 2018-08-20 14:33:03 +02:00
Liang-Heng Chen
6c9d7c21d6 Bug 1481252 - Part 1: Report FastBlock status to docshell; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D3024

--HG--
extra : moz-landing-system : lando
2018-08-16 15:29:22 +00:00
Hiroyuki Ikezoe
61a6f8e3f2 Bug 1478576 - A mochitest for system font change notification. r=froydnj,jimm,karlt
The test case in this patch fails without the proper fix in the first patch
in this patch series.

In this patch two new nsIDOMWindowUtils APIs are introduced to change the
system font settins in tests.  Currently the APIs work only on GTK+ platform.

Also to work the test case properly we need to open a new XUL window because we
don't propagate font changes into descendant documents yet (bug 1478212).

MozReview-Commit-ID: 4OLxEkEuF8d

--HG--
extra : rebase_source : 683e64f07c4d8820e5499d8c15b90975618559b8
2018-08-07 11:58:36 +09:00
Dorel Luca
6e90fcf6e3 Backed out changeset d602a2f69ff8 (bug 1475573) on request from truber. a=backout 2018-08-16 17:49:01 +03:00
Jed Davis
5e630f7ccf Bug 1481978 - Change IPC CloseSuperfluousFds to prevent accidentally heap-allocating closures. r=glandium
Closures are nice but -- as pointed out in bug 1481978 comment #2 --
it's a footgun to take a std::function argument in a context where heap
allocation isn't safe.

Fortunately, non-capturing closures convert to C function pointers,
so a C-style interface with a void* context can still be relatively
ergonomic.
2018-08-15 19:08:40 -06:00
Daosheng Mu
8ac5934ce1 Bug 1430038 - Part 1: Add VR process to the process list; r=kip, jimm
Summary: MozReview-Commit-ID: AWyFur2gLCQ

Tags: #secure-revision

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

MozReview-Commit-ID: HHGDiXyaqnB

--HG--
extra : rebase_source : cbb94eb1aaca4ca385559c0e997b508a80121105
2018-06-22 16:30:14 -07:00
Brian Hackett
9444619b6c Bug 1481346 - Fix problems when forwarding sync messages in the middleman, r=mccr8.
--HG--
extra : rebase_source : 38dfeca916baf25166fea246b94c26a14bf24827
2018-08-14 00:30:09 +00:00
Brian Hackett
0d5d3c2675 Bug 1482275 Part 2 - Recognize hanged replaying processes when reporting crashes, r=gsvelto.
--HG--
extra : rebase_source : eed9d0661e40d74edda3e71d9164fc9972c0dd8c
2018-08-14 00:50:11 +00:00
Henri Sivonen
3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Andrea Marchesini
04fcbb6556 Bug 1480131 - AntiTrackingCommon::IsFirstPartyStorageAccessGrantFor() should not grant permission to sub-sub-iframe channels; r=ehsan 2018-08-10 14:59:33 -04:00
Gabriele Svelto
15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Daniel Varga
31ff8cd9c8 Merge mozilla-central to mozilla inbound. a=merge 2018-08-09 01:10:56 +03:00
Mike Hommey
6d197a0707 Bug 1481719 - Disable profile-instr-out-of-date warnings explicitly rather than allowing all warnings where they appear. r=dmajor 2018-08-09 06:07:33 +09:00
Jesse Schwartzentruber
abc4b27cb4 Bug 1475573 - Create --enable-fuzzing debug build job for Android x86 firefox. r=nalexander,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D2428

--HG--
extra : moz-landing-system : lando
2018-08-07 17:53:57 +00:00
Masatoshi Kimura
3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Noemi Erli
74a710cb5e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-04 15:39:02 +03:00
Noemi Erli
23c8a3a9f3 Backed out changeset 1e9ecba54e7b (bug 1348273) for failing on widget/tests/test_bug1123480.xul 2018-08-04 12:39:40 +03:00
Noemi Erli
0cacb5f9cb Backed out changeset acde419e016e (bug 1475573) for breaking Android builds 2018-08-04 10:12:40 +03:00
Jesse Schwartzentruber
ec180b72d0 Bug 1475573 - Create --enable-fuzzing debug build job for Android x86 firefox. r=froydnj,nalexander
Reviewers: froydnj, nalexander

Reviewed By: froydnj, nalexander

Subscribers: froydnj

Bug #: 1475573

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

--HG--
extra : rebase_source : fcad543ea727e8974dc6aaade92053fa0008c5ff
extra : histedit_source : 0a8b60693d64fef0aefd985d9f3108cf77890e94
2018-08-04 09:46:02 +03:00
Jed Davis
18e4e4ce63 Bug 1480401 - Avoid heap-allocated closures in async signal safe part of LaunchApp. r=froydnj
MozReview-Commit-ID: 4LYtBGbqtVh

--HG--
extra : rebase_source : 4bf706d0b5bd61fdffc0f727cd72591c512ca20c
2018-08-02 14:18:01 -06:00