Commit Graph

1060 Commits

Author SHA1 Message Date
Gian-Carlo Pascutto
ee8084f185 Bug 1104616 - Proxy video capture access to the main process. r=jesup,glandium,mrbkap 2015-08-31 14:51:29 +02:00
Nicholas Nethercote
69d088e45f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Jan Varga
1788e62fe3 Bug 1173756 - Part 1: Update asmjscache to use PBackground; r=luke 2015-08-29 07:45:04 +02:00
Aaron Klotz
de59948261 Bug 1189709 - Reduce scope of MessageChannel window neutering. r=jimm
CLOSED TREE
2015-08-26 15:57:29 -06:00
Cervantes Yu
aa469abcee Bug 1166207 - Load preload.js in the Nuwa process. r=khuey 2015-08-28 17:57:44 +08:00
Yoshi Huang
2e408d4ba7 Bug 1165272 - Part 1: remove getAppCodebasePrincipal. r=bholley 2015-08-17 17:03:19 +08:00
Bobby Holley
8f42e826dc Backed out 3 changesets (bug 1165272) for b2g sanity blocker. 2015-08-25 11:16:21 -07:00
Yoshi Huang
f41381bebf Bug 1165272 - Part 1: Remove getAppCodebasePrincipal. r=bholley 2015-08-24 01:31:00 -04:00
Mike Hommey
d1ad66a0f8 Bug 1189967 - Be slightly more explicit about some conversions to std::wstring. r=nfroyd 2015-08-23 22:20:19 +09:00
Mike Conley
4a4d7cc21a Bug 1191976 - Intentionally crash if we hit an IPC FatalError in the parent process. r=billm
When the parent process has trouble deserializing an IPC message from the content
process, it originally killed that content process. This doesn't result in us
creating a crash report (and doing so is difficult if the FatalError is hit
off main thread). We now crash the parent process if we hit such a FatalError
in the parent process. This will hopefully give us an idea of how frequent
these FatalErrors are, since up until now we've been getting no crash data
for them.
2015-08-18 15:28:01 -04:00
Mike Conley
df3780c4e6 Bug 1106321 - Serialize DEVMODE down to the content process when printing on Windows. r=jimm 2015-08-06 17:36:54 -04:00
Kyle Huey
0a62d4d460 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Bob Owen
c1e6587805 Bug 1189352: Fix NSPR_LOG_FILE with absolute paths for sandboxed child on Windows. r=bbondy 2015-08-03 07:58:43 +01:00
Jesse Ruderman
5e6905f92a Bug 1024259: Use NS_FREE_PERMANENT_DATA more consistently. r=mccr8 2015-07-31 12:11:48 -07:00
Cervantes Yu
b2307503dd Bug 1155547, Part 2: Create PNuwa protocol (managed by PBackground) for forking content processes. r=khuey
This allows us to send a sync fork request to the Nuwa process when we need one but there is no
spare process available. After an app is launched, the request to fork a spare process is still
handled asynchronously.
2015-07-31 15:25:27 +08:00
Andrea Marchesini
491a3c515e Bug 1188776 - Remove appId/isInBrowserElement from BroadcastChannel. r=bholley 2015-07-29 06:56:00 -04:00
Bob Owen
958aa88302 Bug 1171796: Add sandbox rule for child process NSPR log file on Windows. r=bbondy
This also moves the initialization of the sandbox TargetServices to earlier in
plugin-container.cpp content_process_main, because it needs to happen before
xul.dll loads.
2015-07-30 10:04:42 +01:00
Bobby Holley
59c4d9cf6c Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Aaron Klotz
f56584d2b0 Bug 1185639 - Allow deferred message processing to happen between consecutive IPC message dispatches. r=jimm 2015-07-21 01:21:51 -06:00
Mike Hommey
5cb6216446 Bug 1187533 - Change how Gtk+2 plugin-container is started on Gtk+3 builds. r=billm
The current situation looks like this: Firefox launches the plugin-container
with two environment variables set:
  LD_LIBRARY_PATH=$FIREFOX_DIR:$LD_LIBRARY_PATH
  LD_PRELOAD=$FIREFOX_DIR/libmozgtk2.so:$LD_PRELOAD

libxul.so has a dependency on libmozgtk.so (without "2"), but libmozgtk2.so
has a SONAME of libmozgtk.so, so ld.so recognizes libmozgtk2.so as a
dependency of libxul.so, and uses it instead of the actual libmozgtk.so,
making the plugin-container use Gtk+2 instead of Gtk+3 to load Gtk+2 plugins.

Now, ASan sets things up in shared libraries such that they needs a symbol
from the executable binary. So in the case of plugin-container, the
plugin-container executable itself contains some ASan symbols such as
__asan_init_v3. libmozgtk2.so, OTOH, contains an undefined weak reference to
that symbol, like all other Firefox shared libraries.

Since libmozgtk2.so is LD_PRELOADed, it is loaded _before_ the
plugin-container executable, and __asan_init_v3 can't be resolved.

Disabling ASan for libmozgtk2.so would be a possibility, but the build system
doesn't really know how to do that, and filtering out -fsanitize=address
can be fragile.

The alternative possibility, implemented here, is to change the library
loading strategy, renaming libmozgtk2.so to gtk2/libmozgtk.so, and setting
the following environment variable when Firefox launches the plugin-container:
  LD_LIBRARY_PATH=$FIREFOX_DIR/gtk2:$FIREFOX_DIR:$LD_LIBRARY_PATH
2015-07-28 08:19:13 +09:00
Ryan VanderMeulen
2e8222bd19 Merge m-c to inbound. a=merge 2015-07-27 16:06:20 -04:00
Ryan VanderMeulen
1f08fd1eaf Backed out changeset b2d0e28fe539 (bug 1185639) test_plugin_focus.html timeouts. 2015-07-27 16:06:03 -04:00
Andrew McCreight
065d0b780a Bug 1089816 - Let ASan content processes run to completion. r=billm
There are a variety of ways that the parent and child process ensure that
the child process exits quickly in opt builds, but for AddressSanitizer
builds we want to let the child process to run to completion, so that we
can get a LeakSanitizer report.

This requires adding some addition LSan suppressions, because running
LSan in child processes detects some new leaks.
2015-07-27 12:49:48 -07:00
Aaron Klotz
f158251c2f Bug 1185639: Allow deferred message processing to happen between consecutive IPC message dispatches; r=jimm 2015-07-21 01:21:51 -06:00
Christoph Kerschbaumer
03cd461c06 Bug 1143922 - Add AsyncOpen2 to nsIChannel and perform security checks when opening a channel - loadinfo changes (r=sicking,tanvi,sworkman) 2015-07-19 19:11:57 -07:00
Christoph Kerschbaumer
229a41aa30 Bug 1175803 - Store redirect chain within loadInfo - part 1 (r=sicking,mayhemer) 2015-07-19 19:11:03 -07:00
Bill McCloskey
43c87b40d3 Bug 1177013 - Bug fixes for CPOW cancelation (r=dvander) 2015-07-15 14:37:11 -07:00
Jim Mathies
6c14ed1a4d Bug 1128454 - When plugin bridging mysteriously fails, log the ipc channel state along with the nsresult error code. r=billm 2015-07-15 14:47:14 -05:00
Christoph Kerschbaumer
1fe4e1e149 Bug 1179505 - Make LoadInfo arguments optional in ipdl (r=bent,sicking) 2015-07-13 22:43:13 -07:00
Birunthan Mohanathas
47ed3a3675 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Christoph Kerschbaumer
b54daf94aa Bug 1139297 - Implement CSP upgrade-insecure-requests directive - loadinfo changes (r=sicking,sworkman) 2015-07-10 13:57:55 -07:00
Jim Mathies
f7fdc6ece7 Bug 1128454 - Add crash report annotations for plugin bridge operation failures. r=billm 2015-07-09 19:07:49 -05:00
Aaron Klotz
f3b8967b8e Bug 1170231: Part 1 - Remove condition that may cause deadlock in IPC when mediating interrupt races; r=dvander 2015-06-26 11:01:26 -07:00
Ryan VanderMeulen
204b539a88 Merge m-c to inbound. a=merge
CLOSED TREE
2015-07-07 13:38:10 -04:00
Cervantes Yu
697ac390a5 Bug 1172467: Fix an IPC channel file descriptor leak from Nuwa to the child process. r=khuey 2015-07-07 12:10:05 +08:00
Juan Gomez
01df2f691b Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Dragana Damjanovic
e3003eee82 Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Emanuel Hoogeveen
e1b03075a7 Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Bill McCloskey
85478f56c4 Bug 1177013 - Avoid memory leaks when returning errors from IPC Send (r=dvander) 2015-07-06 19:58:46 -07:00
Bill McCloskey
53fc5fa411 Bug 1177013 - Telemetry for CPOW cancelation (r=dvander) 2015-07-06 19:58:46 -07:00
Bill McCloskey
10f63ec5f7 Bug 1177013 - Fix big IPC comment (r=dvander) 2015-07-06 19:58:45 -07:00
Bill McCloskey
c8eda98884 Bug 1177013 - Crash in IPC situations where we don't know what to do (r=dvander) 2015-07-06 19:58:45 -07:00
Bill McCloskey
ad4d5d83e6 Bug 1177013 - Use CancelCurrentTransaction to avoid crashes (r=dvander) 2015-07-06 19:58:44 -07:00
Bill McCloskey
bb04cd7f51 Bug 1177013 - CancelCurrentTransaction IPC support (r=dvander) 2015-07-06 19:58:44 -07:00
Bill McCloskey
5aa494160e Bug 1177013 - Don't allow prio messages while dispatching sync messages (r=dvander) 2015-07-06 19:58:43 -07:00
Bill McCloskey
975f85965e Bug 1177013 - Change IPC locking to get transaction ID correct (r=dvander) 2015-07-06 19:58:42 -07:00
Andrea Marchesini
0bacf2f160 Bug 1165270 - Use origin for BroadcastChannel, r=bholley 2015-07-06 19:28:41 +01:00
Phil Ringnalda
cae35eaf19 Back out 12 changesets (bug 1177013) on suspicion of causing b2g emulator debug test bustage
CLOSED TREE

Backed out changeset 912aae0815f8 (bug 1177013)
Backed out changeset 3b6448172e50 (bug 1177013)
Backed out changeset 2af18bef5703 (bug 1177013)
Backed out changeset e6bf35115c11 (bug 1177013)
Backed out changeset 4d7f5205b60b (bug 1177013)
Backed out changeset f7de893911bc (bug 1177013)
Backed out changeset de79eba232f0 (bug 1177013)
Backed out changeset 978a77b60f2a (bug 1177013)
Backed out changeset f5b52fa19511 (bug 1177013)
Backed out changeset e14a7b70b6fa (bug 1177013)
Backed out changeset d0f5a3474659 (bug 1177013)
Backed out changeset bff9f07dad52 (bug 1177013)
2015-07-02 22:08:54 -07:00
Bill McCloskey
caace3aea9 Bug 1177013 - Avoid memory leaks when returning errors from IPC Send (r=dvander) 2015-07-02 17:18:12 -07:00
Bill McCloskey
4a6db3b3f6 Bug 1177013 - Telemetry for CPOW cancelation (r=dvander) 2015-07-02 17:18:11 -07:00