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

20041 Коммитов

Автор SHA1 Сообщение Дата
Nathan Froyd 1a536ec126 Bug 1639632 - convert xpcom/ to inherit from mozilla::Runnable where possible; r=KrisWright
A little less boilerplate is nice.

Differential Revision: https://phabricator.services.mozilla.com/D76178
2020-05-20 20:37:58 +00:00
Cameron McCormack 0d5684a3a8 Bug 1639419 - Enable frame tree dumps whenever the layout debugger is enabled. r=TYLin,glandium
Differential Revision: https://phabricator.services.mozilla.com/D76076
2020-05-20 23:44:49 +00:00
Lina Cambridge faf2fd15e4 Bug 1639018 - Change `TaskRunnable::dispatch` to take owned runnables. r=froydnj
This matches how the `Dispatch(already_AddRefed<nsIRunnable>)`
overloads work in C++: `Dispatch` takes ownership of the runnable, and
leaks it if dispatch fails—because the thread manager is shutting down,
for instance. This avoids a race where a runnable can be released on
either the owning or target thread.

Rust doesn't allow arbitrary `Self` types yet (see
rust-lang/rust#44874), so we need to change `dispatch` and
`dispatch_with_options` to be associated methods.

Differential Revision: https://phabricator.services.mozilla.com/D75858
2020-05-20 20:54:49 +00:00
Lina Cambridge 28cc6477f4 Bug 1638929 - Expose `NS_DispatchBackgroundTask` to `moz_task`. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D75838
2020-05-20 20:54:11 +00:00
Doug Thayer da4964d1d9 Bug 1639553 - Only flush xulstore writes if using new xulstore r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76169
2020-05-20 16:32:07 +00:00
Nika Layzell 4abbc6024a Bug 1638124 - Part 1: Add NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_DESTROY, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D75607
2020-05-19 18:30:52 +00:00
Doug Thayer 2707a3d1f2 Bug 1638166 - Flush writes to xulstore before fastshutdown r=lina
Some background information on why we want to flush writes: we're
currently working on a "fast shutdown" project, which will simply
call _exit(0) once a certain phase (controlled via pref) in
shutdown is hit. This will allow us to skip a lot of ceremony,
like freeing memory, removing listeners on observer notifications,
etc. However, we don't want to be cavalier about data loss, so
for the time being we want to ensure that all file writes which we
previously had some assurance would complete will continue to
complete. This means explicitly calling them immediately before a
fast shutdown. We also want to call these before we turn on late
write checking, which we control via another pref. This late write
checking surfaces writes via telemetry which we didn't notice with
local testing. However we want to ensure that we flush our writes
before this point so we don't have lots of noise in the telemetry.

Lina I'm requesting review from you since it looks like you did the
reviews on most of the initial code. However, please let me know if
there's someone more suitable.

Depends on D75389

Differential Revision: https://phabricator.services.mozilla.com/D75572
2020-05-18 22:47:14 +00:00
Simon Giesecke f5342d154a Bug 1637605 - Add support for polymorphic return values to ToResultInvoke. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D75294
2020-05-19 09:07:08 +00:00
Jean-Yves Avenard 38cfa9db61 Bug 1637890 - P4. Process events dispatched by destructors during shutdown. r=froydnj
We allow the last tasks dispatched during shutdown to be run rather than just leaking them.

Differential Revision: https://phabricator.services.mozilla.com/D75497
2020-05-19 06:06:18 +00:00
Jean-Yves Avenard 906437cc5d Bug 1637890 - P3. Ensure an AbstractThread exists when dispatching a task. r=froydnj
When performing the last GC, remaining state watchers would dispatch direct tasks ; this was exposed with P3. Ensure this never happens.

Differential Revision: https://phabricator.services.mozilla.com/D75499
2020-05-18 02:30:27 +00:00
Jean-Yves Avenard de5872ee7a Bug 1637890 - P2. Don't use ClearOnShutdown to destroy AbstractThread::MainThread(). r=froydnj
During the last cycle collection, state watchers may attempt to dispatch tasks to the current AbstractThread, so we can't clear the TLS entry until that step has completed.

We want the object to be deleted last; ordering in call to ClearOnShutdown() can't guarantee it.

Differential Revision: https://phabricator.services.mozilla.com/D75498
2020-05-18 16:12:28 +00:00
Jean-Yves Avenard 7134202aff Bug 1637890 - P1. Process ClearOnShutdown listeners in LIFO order. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D75496
2020-05-16 07:10:11 +00:00
Jean-Yves Avenard dfb2061bb1 Bug 1634264 - Reject MozPromise when DomPromiseListener is deleted. r=mattwoodrow
We remove the assertion that the error code was NS_OK, as users of FromDomPromise assert it must be a failure.

Differential Revision: https://phabricator.services.mozilla.com/D75737
2020-05-18 22:16:38 +00:00
Kershaw Chang 5732714230 Bug 1539819 - P3: Some adjustments to make TRRServiceChannel work on socket process r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D68399
2020-05-18 20:18:08 +00:00
Nicklas Boman 4f2fa0cfa7 Bug 1515419 - fixing ToNewCString (and ToNewUnicode as well) xpcom/string/nsReadableUtils.cpp r=froydnj,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D17411
2020-05-17 06:58:48 +00:00
Aaron Klotz b392ecef67 Bug 1637452: Part 3 - Fix JNI includes in xpcom; r=froydnj
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75366
2020-05-15 17:04:15 +00:00
Razvan Maries 481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Sebastian Streich 6733f1311c Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-05-15 14:03:43 +00:00
Kartikaya Gupta f0902cd3df Bug 1622360 - Singularize the TransactionData across IPC. r=jrmuizel
Depends on D75386

Differential Revision: https://phabricator.services.mozilla.com/D75387
2020-05-15 00:10:36 +00:00
Kartikaya Gupta a8a5c7ea5b Bug 1622360 - Singularize the DisplayListData across IPC. r=jrmuizel
Depends on D75384

Differential Revision: https://phabricator.services.mozilla.com/D75386
2020-05-15 00:08:52 +00:00
Kartikaya Gupta 9aecce17bb Bug 1622360 - Rename RenderRootUpdates. r=jrmuizel
Depends on D75383

Differential Revision: https://phabricator.services.mozilla.com/D75384
2020-05-15 00:08:03 +00:00
Kartikaya Gupta c9a8fb7425 Bug 1622360 - Rename RenderRootDisplayListData. r=jrmuizel
Depends on D75125

Differential Revision: https://phabricator.services.mozilla.com/D75383
2020-05-15 00:07:34 +00:00
Doug Thayer b9c06ee24f Bug 1638062 - Do StartupCache write before lateWriteChecksStage r=froydnj
We already ensure that we finish our write before doing a fast
shutdown, but right now there's just too much noise in the late
write checking telemetry because of this.

Differential Revision: https://phabricator.services.mozilla.com/D75389
2020-05-14 18:58:07 +00:00
Kershaw Chang 7922f6e91f Bug 1549323 - Make sure session cache is cleared in socket process r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D74906
2020-05-14 12:21:59 +00:00
Bogdan Tara edcb53f163 Backed out 2 changesets (bug 1558394) for nsDocShellLoadState related bustage CLOSED TREE
Backed out changeset 5889105bd089 (bug 1558394)
Backed out changeset 80a0ea17c9f8 (bug 1558394)
2020-05-14 15:17:32 +03:00
Sebastian Streich bb85ae41b1 Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-05-14 10:05:55 +00:00
Imanol Fernandez cee36f038b Bug 1636456 - Implement WebXR idle deadline detection r=kip,daoshengmu,smaug,rbarker
Gecko Idle detection relies heavily on RefreshDriver. GC/CC scheduling, including when to run GC or CC slices, and the length of the slices, is mostly based on idle time. As WebXR isn't using normal RefreshDriver, the content process thinks it's idle and GC and CC get basically up to 50 ms slices.

Not having WebXR idle detection is causing stutter frames during immersive presentation. This patch implements idle deadline hint and sets the correct GC slices budgets during WebXR presentation.

Differential Revision: https://phabricator.services.mozilla.com/D74426
2020-05-13 22:10:27 +00:00
Tom Tung 3d101cac5a Bug 1634267 - DOS device paths shouldn't be blocked by IsBlockedUNCPath; r=dom-workers-and-storage-reviewers,janv,froydnj
Bug 1536796 introduces "\\?\" prefix (DOS device specifier) to Windows file
paths. At the moment, the prefix is only prepended to the file paths that start
with a disk designator and a backslash.

On the other hands, IsBlockedUNCPath blocks file paths that start with "\\" in
Windows and that includes DOS device paths (the cases mentioned above).

Thus, this patch prevents DOS device paths from being treating as UNC paths in
IsBlockedUNCPath.

Differential Revision: https://phabricator.services.mozilla.com/D73621
2020-05-13 14:32:35 +00:00
Jean-Yves Avenard e574b42ad5 Bug 1592488 - P13. Add TailDispatchingTarget class. r=bholley
This wraps the current thread such that a call to Dispatch will be done as direct task dispatch instead so that the task will be run in the current event loop.
This allows for have similar (but not identical to) the microtask semantics of JS promises

Differential Revision: https://phabricator.services.mozilla.com/D69995
2020-05-12 10:45:23 +00:00
Jean-Yves Avenard ecf59bcb19 Bug 1592488 - P3. Update AbstractThread comment to reflect current mode of operation. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74591
2020-05-12 10:42:52 +00:00
Jean-Yves Avenard ab7618f0d9 Bug 1592488 - P2. Add MozPromise::Private::UseDirectTaskDispatch. r=bholley
If set, the callback will be dispatched via a direct task.
Direct tasks are run via the current thread's tail dispatcher.
This mechanism is only available if both the caller and the target are on the same thread and an AbstractThread is available

Differential Revision: https://phabricator.services.mozilla.com/D71592
2020-05-12 10:42:44 +00:00
Jean-Yves Avenard 68431ed26f Bug 1592488 - P1. Add MozPromise::Private::UseSynchronousTaskDispatch. r=bholley
If set, the callback will be run synchronously when the promise is resolved or rejected.

Differential Revision: https://phabricator.services.mozilla.com/D71591
2020-05-12 10:53:48 +00:00
Honza Bambas 281f7b311b Bug 1634950 - Add event dispatch-and-run MOZ_LOG to our xpcom threads, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73622
2020-05-12 12:48:49 +00:00
Ricky Stewart 5b7d4ea2b1 Bug 1635755 - Part 1: Emit JSON data in deterministic order in `jsonxpt` r=nika
In Python 3, iteration order over the contents of a native `dict` is always unpredictable, which results in bugs like bug 1635755 where `xptdata.cpp` has irreproducible content. To avoid this, we be sure to always write out JSON in a fixed, deterministic order.

Differential Revision: https://phabricator.services.mozilla.com/D74443
2020-05-11 15:35:58 +00:00
Edgar Chen 88a9a03a8a Bug 1618295 - Add imageSrcset and imageSizes attributes in HTMLLinkElement; r=hsivonen
See https://html.spec.whatwg.org/multipage/semantics.html#htmllinkelement.

Depends on D68786

Differential Revision: https://phabricator.services.mozilla.com/D71949
2020-05-11 14:08:58 +00:00
Bas Schouten e77dae9051 Bug 1635414: Cancel second repeating runnable. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D73857
2020-05-05 20:45:48 +00:00
Simon Giesecke e6422e2afd Bug 1626570 - Remove obsolete copy enabling machinery. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D72176
2020-05-11 08:23:03 +00:00
Simon Giesecke 2a7be3ea65 Bug 1626570 - Make nsTArray non-copyable. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73686
2020-05-11 08:22:45 +00:00
Valentin Gosu d986351217 Bug 1624090 - Make it possible to forward rust logging into the Gecko logger r=froydnj
This makes it possible to enable rust logging at runtime using about:networking

Differential Revision: https://phabricator.services.mozilla.com/D73146
2020-05-09 11:24:33 +00:00
Jean-Yves Avenard 4f02149e61 Bug 1634253 - P4. Have NS_NewNamedThread take a already_Refed<nsIRunnable. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73823
2020-05-08 20:20:28 +00:00
Jean-Yves Avenard ee2897c234 Bug 1634253 - P3. Don't cause assertion when delay is 0. r=froydnj
already_AddRefed destructor assert that it's nullptr.
DelayedDispatch check that the value passed isn't 0 and return an error code, leaving the already_AddRefed untouched.

Differential Revision: https://phabricator.services.mozilla.com/D73821
2020-05-08 20:20:30 +00:00
Jean-Yves Avenard 0afd0b06c9 Bug 1634253 - P2. Dissociate running a BackgroundHangMonitor from main thread. r=froydnj
This will allow to have other threads to use one such as the compositor thread.

Differential Revision: https://phabricator.services.mozilla.com/D73820
2020-05-08 20:20:32 +00:00
Jean-Yves Avenard dd75a6a8ab Bug 1634253 - P1. Fix constness. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73819
2020-05-08 20:20:35 +00:00
Chris Fronk af8a02cc9d Bug 1512991 - Add JsonWriteFunc::Write to take string length. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D72560
2020-05-08 16:24:31 +00:00
Narcis Beleuzu 58a833221c Backed out 9 changesets (bug 1634253) for bc failures on browser_bug295977_autoscroll_overflow.js . CLOSED TREE
Backed out changeset d41b75c1f7ec (bug 1634253)
Backed out changeset 5f8a1ee17b81 (bug 1634253)
Backed out changeset 43eda078b405 (bug 1634253)
Backed out changeset e98212a74709 (bug 1634253)
Backed out changeset 855e222ceb14 (bug 1634253)
Backed out changeset 9f01acdf4367 (bug 1634253)
Backed out changeset ea62cb1ec472 (bug 1634253)
Backed out changeset fa3e7588e7d6 (bug 1634253)
Backed out changeset 139e7035e736 (bug 1634253)
2020-05-08 23:09:31 +03:00
Jean-Yves Avenard f597eaee8b Bug 1634253 - P4. Have NS_NewNamedThread take a already_Refed<nsIRunnable. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73823
2020-05-07 08:04:34 +00:00
Jean-Yves Avenard efec5e2e85 Bug 1634253 - P3. Don't cause assertion when delay is 0. r=froydnj
already_AddRefed destructor assert that it's nullptr.
DelayedDispatch check that the value passed isn't 0 and return an error code, leaving the already_AddRefed untouched.

Differential Revision: https://phabricator.services.mozilla.com/D73821
2020-05-07 08:04:37 +00:00
Jean-Yves Avenard 3e533d2327 Bug 1634253 - P2. Dissociate running a BackgroundHangMonitor from main thread. r=froydnj
This will allow to have other threads to use one such as the compositor thread.

Differential Revision: https://phabricator.services.mozilla.com/D73820
2020-05-07 08:04:39 +00:00
Jean-Yves Avenard 2494dc377e Bug 1634253 - P1. Fix constness. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73819
2020-05-07 08:04:41 +00:00
Ricky Stewart 1395fb03f0 Bug 1634737 - GeneratedFile() template should yell at you if you try to set py2=True r=glandium
As of bug 1621451 this argument was ignored, but it just silently runs your code with `python3` if you pass it anyway. Ensure this doesn't happen any more, and protect against any other unexpected arguments as well.

Differential Revision: https://phabricator.services.mozilla.com/D73485
2020-05-05 15:53:37 +00:00