Commit Graph

4880 Commits

Author SHA1 Message Date
Ben Kelly
b970b0c8cc Bug 1459209 P1 Add IPC actor boilerplate for PServiceWorker, PServiceWorkerContainer, and PServiceWorkerRegistration. r=mrbkap
--HG--
extra : rebase_source : 10106a76c6e9188238a89821d59bdcbf4eedbab6
2018-07-09 16:02:39 -07:00
Andrea Marchesini
ba1f8971c7 Bug 1469993 - Grant storage access to a 3rd party, tracking resource if a opened document has user-interaction - part 2 - storing first user interaction in nsILoadInfo, r=ehsan 2018-07-10 10:09:59 +02:00
James Teh
f9e7e0747a Bug 1474007: Null check to prevent crash when ipc::mscom::GetInitialInterceptorForIID fails after PublishTarget. r=aklotz
PublishTarget calls Unlock on our LiveSetAutolock.
It's possible for GetInitialInterceptorForIID to fail after this point.
This will cause the failure cleanup code to run, which tries to call Unlock again.
However, the previous call to Unlock set mLiveSet to null, and Unlock previously didn't handle this case.
Now, unlock is a no-op (in release builds) if it's already been called.

MozReview-Commit-ID: 15ffXR6nKqc

--HG--
extra : rebase_source : bf072824f15f5574dd8afbedef82b795086d5fff
2018-07-09 10:24:20 +10:00
Nathan Froyd
b07d6639b8 Bug 1472806 - fix missing typename warning in COMPtrHolder.h; r=aklotz
MSVC permits the missing `typename` as an extension, whereas clang-cl warns.
This is easy to fix, so let's fix the warning noise.
2018-07-03 17:04:26 -04:00
Nathan Froyd
0b0f08aedb Bug 1472806 - fix -Wpessimizing-move warnings in Interceptor.cpp; r=aklotz
There's no need to invoke std::move here, because Get() is already
returning a temporary that can be moved into the RefPtr.
2018-07-03 17:04:27 -04:00
James Teh
d4ef733244 Bug 1472137 - Prevent mutex reentry in mscom::Interceptor::Create if GetInitialInterceptorForIID fails. r=aklotz
If GetInitialInterceptorForIID fails, the live set lock is not released in most cases, but the newly created Interceptor will be destroyed.
The Interceptor's destructor tries to acquire the live set lock again, but that causes a deadlock, since reentry is no longer allowed for a mutex after bug 1364624.
GetInitialInterceptorForIID now ensures the live set lock is always released  on failure, thus preventing the deadlock.

MozReview-Commit-ID: z0Q7JLnJXQ

--HG--
extra : amend_source : 0b9837e5500754b5782e72337fc59b7904c5e29c
2018-07-02 15:17:12 +10:00
Jed Davis
7682cb33f7 Bug 1469691 - Fix intermittent launch failure caused by registering a Mach port too late. r=erahm
--HG--
extra : rebase_source : 3d943e7362483bd83c064d6c8560e4ffd3ecc97f
2018-06-21 11:05:00 -06:00
Anny Gakhokidze
535e3c83a1 Bug 1470540 - Improve performance of DataTransfer::CacheExternalClipboardFormats, r=baku,mccr8
Currently, in order to retrieve supported clipboard formats
DataTransfer::CacheExternalClipboardFormats repeatedly makes the same calls to
clipboard->HasDataMatchingFlavors.

In the case when aPlainTextOnly == true only 1 call is made -
clipboard->HasDataMatchingFlavors(kUnicodeMime, ...), and when
aPlainTextOnly == false we have 1 call made for every member of the list
{ kCustomTypesMime, kFileMime, kHTMLMime, kRTFMime, kURLMime, kURLDataMime,
kUnicodeMime, kPNGImageMime } - a total of 8 calls.

We can see that in nsClipboardProxy::HasDataMatchingFlavors, there is a call to
ContentChild::GetSingleton()->SendClipboardHasType.
So when aPlainTextOnly == true, we will have 1 sync message, and when
aPlainTextOnly == false, we will have 8 sync messages.

With the proposed solution, in DataTransfer::CacheExternalClipboardFormats
we will only have 1 sync message regardless of the case because
GetExternalClipboardFormats() will retrieve all supported clipboard
formats at once.

MozReview-Commit-ID: CAmBfqB459v

--HG--
extra : rebase_source : 27f1b420f2613e6a747ed63762f1583ab71ba3e0
2018-06-22 14:28:27 -04:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
André Bargull
1eba073f7e Bug 1467438 - Part 4: Remove ScopedJSFreePtr, ScopedJSDeletePtr, and ScopedReleasePtr. r=sfink 2018-06-07 12:33:40 -07:00
Ben Kelly
bee2ef4646 Bug 1470114 Make parent-side of redirect override the reserved ClientInfo to handle some corner cases. r=valentin 2018-06-22 08:09:00 -07:00
Doug Thayer
10ff9c706f Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : dd000a05bfc2da40c586644d33ca4508fa5330f6
2018-04-29 18:21:20 -07:00
Andrea Marchesini
53a373287d Bug 1455256 - Port more components to WorkerRef - part 2 - IPCStream, r=asuth 2018-06-18 16:37:21 -04:00
Stephen A Pohl
80b1014efb Bug 1461459: Add nightly-only MOZ_CRASH statements in base::LaunchApp on macOS to investigate failures to asynchronously launch content processes. r=jld 2018-06-15 10:46:33 -07:00
Andi-Bogdan Postelnicu
845e499a7c Bug 1453795 - IPC - Initialize member fields in classes/ structures. r=jmathies 2018-06-14 08:48:43 +03:00
Sylvestre Ledru
7c352fb5ff Bug 1468272 - Get rid of the codedir usage as it doesn't exist since 2009 r=froydnj
MozReview-Commit-ID: JX0rqoetgN8

--HG--
extra : rebase_source : e8e66b14f06ca37e5e9a4530f8ef657a531e885a
2018-06-11 17:27:34 -07:00
Jed Davis
b0a1468c01 Bug 1456911 - Rewrite the fd shuffling to be simpler & handle identity mappings correctly. r=froydnj
This replaces some old Chromium code that tries to minimally disentangle
an arbitrary file descriptor mapping with simpler algorithm, for several
reasons:

1. Do something appropriate when a file descriptor is mapped to the same
fd number in the child; currently they're ignored, which means they'll
be closed if they were close-on-exec.  This implementation duplicates
the fd twice in that case, which seems to be uncommon in practice; this
isn't maximally efficient but avoids special-case code.

2. Make this more generally applicable; the previous design is
specialized for arbitrary code running between fork and exec, but we
also want to use this on OS X with posix_spawn, which exposes a very
limited set of operations.

3. Avoid the use of C++ standard library iterators in async signal safe
code; the Chromium developers mention that this is a potential problem in
some debugging implementations that take locks.

4. In general the algorithm is simpler and should be more "obviously
correct"; more concretely, it should get complete coverage just by being
run normally in a debug build.

As a convenient side benefit, CloseSuperfluousFds now takes an arbitrary
predicate for which fds to leave open, which means it can be used in
other code that needs it without creating a fake fd mapping.

MozReview-Commit-ID: EoiRttrbrKL

--HG--
extra : rebase_source : 336e0ba9f56dc80f7347dc62617b4ad1efea7e7e
2018-04-25 17:44:08 -06:00
Jed Davis
8b7c054c0a Bug 1456911 - Prelude: Fix unified build breakage exposed by the next patch. r=froydnj
This directory has a number of places where files unintentionally depend
on `#include`s and `using` directives and forward declarations in other
files in the same unified build group.  Adding a file shifts the group
boundaries and exposes some of those bugs; this patch fixes them (but
there are others).

MozReview-Commit-ID: AqAOdnXniTn

--HG--
extra : rebase_source : ed6030785d9cc5cc0ea1a46707725472de1c0fa9
2018-05-11 20:25:19 -06:00
Ben Kelly
ecb17922d9 Bug 1468213 Propagate nsILoadInfo.serviceWorkerTaintingSynthesized and tainting values from parent process to child process. r=valentin 2018-06-11 12:54:22 -07:00
Alex Gaynor
442c1c9d02 Bug 1451859 - Part 3: In FUZZER builds, do not crash on malformed IPC messages. r=jld, r=posidron 2018-04-05 15:47:34 -04:00
Alex Gaynor
b174206e6f Bug 1451859 - Part 2: Add sanitizer coverage to a handful of places relevant to IPC. r=posidron 2018-04-05 15:48:11 -04:00
Alex Gaynor
de04abe10c Bug 1451859 - Part 1: Implement a fuzzer for IPC handlers using libFuzzer. r=jld, r=posidron 2018-03-23 16:18:42 -04:00
Jan de Mooij
56ca3c9524 Bug 1466501 part 1 - Refactor ZoneSpecifier and add a sameCompartmentAs option to newGlobal in the shell. r=luke 2018-06-07 10:02:10 +02:00
Cosmin Sabou
18d0742c9b Backed out 3 changesets (bug 1451859) for causing Spidermonkey bustages on Linux x64 opt.
Backed out changeset 8f5a9e18e953 (bug 1451859)
Backed out changeset 950fa584ec8e (bug 1451859)
Backed out changeset f1f42726f1ec (bug 1451859)
2018-06-07 09:10:35 +03:00
Alex Gaynor
c9f96864de Bug 1451859 - Part 3: In FUZZER builds, do not crash on malfored IPC messages. r=jld, r=posidron 2018-04-05 15:47:34 -04:00
Alex Gaynor
76b53de450 Bug 1451859 - Part 2: Add sanitizer coverage to a handful of places relevant to IPC. r=posidron 2018-04-05 15:48:11 -04:00
Alex Gaynor
c26d72178f Bug 1451859 - Part 1: Implement a fuzzer for IPC handlers using libFuzzer. r=jld, r=posidron 2018-03-23 16:18:42 -04:00
Stephen A Pohl
6b3beb098b Bug 1461459: Add nightly-only release asserts in GeckoChildProcessHost::PerformAsyncLaunchInternal to investigate failures to asynchronously launch content processes. r=jld 2018-06-05 21:12:20 -04:00
Bogdan Tara
3737701cfa Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-05 12:33:18 +03:00
Nazım Can Altınova
e2504d14ab Bug 1465667 - Call mach_make_memory_entry_64 with MAP_MEM_NAMED_CREATE to exceed the 128mb limit on macOS r=jld
We were first allocating and mapping a virtual memory area using mach_vm_allocate
(similar to mmap with MAP_ANON) and then obtaining a shareable capability for the
underlying VM object using mach_make_memory_entry_64. However the memory mapping
is fragmented into multiple objects if it's over 128mb. Larger memory allocations
than 128mb weren't possible. To fix this, we are calling  mach_make_memory_entry_64
with MAP_MEM_NAMED_CREATE. That will create a new memory object and return a port
for it.

MozReview-Commit-ID: 5LLiaqJx175

--HG--
extra : rebase_source : 7ac964a1093eaf8ee30f319f5d21132c5d884362
2018-06-01 19:43:54 +02:00
Dorel Luca
535f1df913 Merge mozilla-central to mozilla-inbound 2018-06-04 21:48:29 +03:00
Ben Kelly
85490e45e8 Bug 1441932 P3 Forward reserved client, initial client, and controller on Redirect2Verify message back to parent. r=mayhemer 2018-06-04 09:26:51 -07:00
Ben Kelly
5697bd9f89 Bug 1441932 P1 Add the ServiceWorker controller to ParentLoadInfoForwarderArgs. r=mayhemer 2018-06-04 09:26:50 -07:00
Andreea Pavel
4ced6e8b2d Merge mozilla-central to autoland. a=merge 2018-06-03 07:27:01 +03:00
Andrea Marchesini
d13a49eca5 Bug 1466023 - nsHostObjectURI renamed BlobURL, r=qdot
--HG--
rename : dom/file/nsHostObjectURI.cpp => dom/file/BlobURL.cpp
rename : dom/file/nsHostObjectURI.h => dom/file/BlobURL.h
2018-06-02 15:51:42 +02:00
Hiroyuki Ikezoe
2dffa2305c Bug 1464568 - Add an IPC call to get transform value for a given element on the compositor. r=froydnj,kats
This function returns the transform value modified by both OMTA and APZC.
Note that the transform conversion code is almost the same as the code dropped
in https://hg.mozilla.org/mozilla-central/rev/415811f3804f .

MozReview-Commit-ID: HmsMQp3O4n4

--HG--
extra : rebase_source : ac3994359d646dedaa5ff2f664b20787be8a75f6
2018-06-05 09:18:22 +09:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andrea Marchesini
c2a7f75146 Bug 1464090 - Passing the length if known via IPCStream and use InputStreamLengthWrapper when deserialized, r=froydnj, r=mayhemer 2018-05-31 18:12:25 +02:00
Andrea Marchesini
4a5b123402 Bug 1464090 - Implement InputStreamLengthWrapper to make any stream nsIInputStreamLength and nsIAsyncInputStreamLength, r=froydnj 2018-05-31 18:12:25 +02:00
Andrea Marchesini
1273dc5391 Bug 1446933 - Remove 'using namespace mozilla::net' from BackgroundUtils.h, r=qdot 2018-05-30 21:21:17 +02:00
Cameron Kaiser
06d4641b77 Bug 1464754 - Use proper atomicops for ppc32/ppc64. r=froydnj 2018-05-27 22:50:05 -07:00
Kartikaya Gupta
1832f1798c Bug 1417784 - Properly implement SyncWithCompositor for WebRender. r=froydnj,sotaro
This defines three flushing functions that flush different parts of the
WR pipeline. Using all three guarantees that everything sent to WR will
have been flushed. This is what we need to do in SyncWithCompositor to
ensure that it meets the API contract.

In addition, this patch updates the existing FlushRendering function to
use the new functions (no functional changes intended here).

MozReview-Commit-ID: GzxwpF4JT04

--HG--
extra : rebase_source : 1a8cf434d1280902906da257ae63751da7ffd114
2018-05-28 11:29:52 -04:00
Rofael Aleezada
dd5f62f8fa Bug 806514 - Replaced std::vector with nsTArray in Histogram::SampleSet. r=chutten
MozReview-Commit-ID: 6ptwiOz2c5i

--HG--
extra : rebase_source : a50dd5ae00689a4186dc2040eac2a19029ab5a2d
2018-05-23 21:50:29 -05:00
Dorel Luca
d54a3b06aa Backed out changeset da12c077747f (bug 1448040) for Android build bustage on build/src/obj-firefox/dist/include/mozilla/HangAnnotations.h. CLOSED TREE
--HG--
extra : amend_source : 683201b5a47af3cb7fdcb7426c65f1c9ed713186
2018-05-25 20:13:26 +03:00
Doug Thayer
9765bdd0e0 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : a8840bd26f4b01b756ffa72345ababb625048550
2018-04-29 18:21:20 -07:00
Alessio Placitelli
c5ecfdbb33 Bug 1459144 - Fix CountHistogram deserialization for GeckoView. r=chutten,janerik
This adds all the samples from the provided sample set to the CountHistogram's
storage, instead of just adding 1 sample of value 1. This change does not affect
code outside of GeckoView persistence since |AddSampleSet| is not used in other
places.

MozReview-Commit-ID: 9bE0M9dgrtE

--HG--
extra : rebase_source : c2147d084415518b02148daa83107045f2993c0f
2018-05-22 17:15:26 +02:00
Dorel Luca
21590be8b8 Merge mozilla-central to mozilla-inbound 2018-05-23 13:05:09 +03:00
Dorel Luca
dc6d856805 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-23 12:51:22 +03:00
Andrea Marchesini
c866348d1e Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 2 - IPCBlobInputStream exposes nsIInputStreamLength, r=smaug 2018-05-23 07:12:35 +02:00