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

2001 Коммитов

Автор SHA1 Сообщение Дата
Bogdan Tara e63d1b0d21 Backed out changeset 9c13c984601a (bug 1665461) for browser_preXULSkeletonUIRegistry.js failures CLOSED TREE 2020-11-12 20:49:21 +02:00
Emma Malysz 3e7bd6c9f4 Bug 1665461: reflect the correct colors for default themes in the skeleton UI. r=dthayer
This patch supports a skeleton UI for default, light, and dark themes.
It is not enabled for apenglow or any custom themes.

This also takes into account the system theme. If the user has the default
theme selected and is in dark mode, we override the theme and present the
dark theme skeleton UI.

Differential Revision: https://phabricator.services.mozilla.com/D96230
2020-11-12 16:05:47 +00:00
Toshihito Kikuchi dacc9d3479 Bug 1659438 - Part3: Add an array of the dependent modules paths to SharedSection. r=mhowell
This patch adds a list of the executable's dependent module's path to SharedSection
as an array of the offset to a string and a string buffer.  A following patch will
use this data from the browser process and the sandboxed processes.

Depends on D96283

Differential Revision: https://phabricator.services.mozilla.com/D96284
2020-11-10 20:52:00 +00:00
Toshihito Kikuchi 187d19452d Bug 1659438 - Part2: Transfer Kernel32ExportsSolver as a shared memory. r=mhowell
We transfer several ntdll's function addresses to a child process directly via
`WriteProcessMemory`.  This patch changes the way to transfer data to using
a section object as Chromium sandbox does, so that we can transfer more data
with the same cost as transferring a single handle value.

Depends on D96282

Differential Revision: https://phabricator.services.mozilla.com/D96283
2020-11-10 20:51:00 +00:00
Emma Malysz 21991a311d Bug 1670957, add placeholder rectangles for toolbarbuttons and display in skeleton UI r=dthayer,smaug,Gijs
If a searchbar is present, draw that similar to a urlbar.
This also changes how we store the urlbar, as we know will use our custom struct
to cleanly store the width and height.

Differential Revision: https://phabricator.services.mozilla.com/D95029
2020-11-10 16:48:10 +00:00
Toshihito Kikuchi 925e53c4f3 Bug 1672367 - Block Digital Guardian's module older than 7.6. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D96434
2020-11-10 13:21:18 +00:00
Doug Thayer 67c1c99d93 Bug 1666653 - Set sPreXULSkeletonUIEnabled correctly r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D95576
2020-11-06 20:58:46 +00:00
Doug Thayer 7d126d9916 Bug 1666653 - Only draw the skeleton UI when cmdline args are approved r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D95575
2020-11-06 20:58:43 +00:00
Doug Thayer 26315aa98c Bug 1674221 - Prefix Skeleton UI reg names with exe path r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D95541
2020-11-06 19:35:20 +00:00
Gerald Squelart e7313b8f47 Bug 1674737 - Use SpliceableJSONWriter::UniqueStringElement in DeserializeAfterKindAndStream - r=gregtatum
Unique strings are used to encode all markers' 'name' field, SpliceableJSONWriter::UniqueStringElement can be used for that (instead of a caller-provided callback, which was necessary before UniqueJSONStrings was de-duplicated).

Differential Revision: https://phabricator.services.mozilla.com/D95513
2020-11-06 11:29:11 +00:00
Gerald Squelart 7e48b598df Bug 1674737 - Make SpliceableJSONWriter optionally point at a UniqueJSONStrings, with pass-through functions - r=gregtatum
Some markers (e.g., Screenshot) use unique strings in their data.

The UniqueJSONStrings used during streaming is attached to the SpliceableJSONWriter, and StreamJSONMarkerData can use pass-through functions UniqueStringProperty() and UniqueStringElement().

Differential Revision: https://phabricator.services.mozilla.com/D95512
2020-11-06 11:28:42 +00:00
Gerald Squelart 5f4f178337 Bug 1674737 - Use SpliceableJSONWriter instead of JSONWriter when streaming markers - r=gregtatum
Some markers (e.g., GC major/minor/slice) need to splice JSON strings in their data.
So now, instead of JSONWriter, StreamJSONMarkerData functions will be given a mozilla::baseprofiler::SpliceableJSONWriter.

Differential Revision: https://phabricator.services.mozilla.com/D95511
2020-11-06 11:28:33 +00:00
Gerald Squelart 2fd5e93f78 Bug 1674968 - Fix UniqueJSONStrings copy constructor, to actually copy from the source - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D95833
2020-11-06 01:36:09 +00:00
Gerald Squelart 896ddd992a Bug 1674968 - UniqueJSONStrings unit tests - r=gregtatum
`UniqueJSONStrings` constructors now accept a `JSONWriter::CollectionStyle` to pass to the internal JSON writer.
The default won't change how the unique string list is output (with friendly indented lines), but tests can use `JSONWriter::SingleLineStyle` to make comparison strings more readable and maintainable.

Differential Revision: https://phabricator.services.mozilla.com/D95832
2020-11-06 01:35:36 +00:00
Narcis Beleuzu 0723378bf7 Backed out 2 changesets (bug 1674221) for SM bustages on PreXULSkeletonUI.cpp
Backed out changeset 3d9b951db0f4 (bug 1674221)
Backed out changeset 5092fde1ebe1 (bug 1674221)
2020-11-05 22:54:10 +02:00
Doug Thayer 21230c3f49 Bug 1674221 - Prefix Skeleton UI reg names with exe path r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D95541
2020-11-05 20:18:16 +00:00
Alexis Beingessner e75e8e5b98 Bug 1608068 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95128
2020-11-03 01:02:11 +00:00
Florian Quèze 49855a4e40 Bug 1674234 - Add a profiler marker for creating the skeleton UI, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D95219
2020-11-02 19:45:22 +00:00
Bogdan Tara 6b2d214e53 Backed out 2 changesets (bug 1601632, bug 1608068) for ScriptPreloader related tsan failures CLOSED TREE
Backed out changeset 2f14d44bacf2 (bug 1601632)
Backed out changeset ebd82e2edbdc (bug 1608068)
2020-11-03 02:58:08 +02:00
Alexis Beingessner 2507488d07 Bug 1506812 - Wrap all accesses to URLPreloader's mReaderThread in a mutex. r=decoder,nika
The shutdown code of BackgroundReadFiles races with BeginBackgroundRead.
This is paritally obfuscated by the usage of the initialEvent convenience
of NS_NewNamedThread, so this change also removes that in favour of explicit
dispatch. (xpcom devs want to remove the convenience anyway)

Differential Revision: https://phabricator.services.mozilla.com/D94877
2020-11-02 23:26:05 +00:00
Alexis Beingessner 19c8d885b8 Bug 1601632 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95129
2020-11-02 23:22:22 +00:00
Alexis Beingessner b2c9198c9c Bug 1608068 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95128
2020-11-02 23:22:13 +00:00
Gerald Squelart 4fedf5eb76 Bug 1674045 - Remove unused ProfilerStringView::String() - r=gregtatum
The previous patch removed the only two uses of ProfilerStringView::String().
Since it can be potentially expensive (creating a `std::string` object, sometimes allocating a buffer, and copying the string contents), it's best to remove it completely.

Differential Revision: https://phabricator.services.mozilla.com/D95116
2020-11-02 13:56:14 +00:00
Gerald Squelart 9acb23c062 Bug 1674045 - UniqueJSONStrings takes string spans instead of pointers - r=gregtatum
For consistency with `JSONWriter` (which UniqueJSONStrings' functions use), and for added safety and some efficiency, UniqueJSONStrings now takes `Span<const char`> arguments instead of raw pointers to null-terminated strings.

Differential Revision: https://phabricator.services.mozilla.com/D95114
2020-11-02 13:55:16 +00:00
Gerald Squelart c68a3c6b21 Bug 1674045 - Add documentation to UniqueJSONStrings, and clean up - r=gregtatum
Document the class and methods.
`GetOrAddIndex` is only used internally, so it can be private.
`SpliceStringTableElements` can now only work on rvalue UniqueJSONStrings, this emphasizes that it shouldn't be used anymore after this call.

Differential Revision: https://phabricator.services.mozilla.com/D95113
2020-11-02 13:54:43 +00:00
Gerald Squelart 7e610c2025 Bug 1674045 - Deduplicate UniqueJSONStrings - r=gregtatum
The two identical copies are `UniqueJSONStrings` are combined and moved almost verbatim to BaseProfilerJSONWriter.h.

Differential Revision: https://phabricator.services.mozilla.com/D95112
2020-11-02 13:54:20 +00:00
Doug Thayer 9fbd3ff6c4 Bug 1674540 - Remove unused prthread.h include r=agashlin
This snuck in after I forgot to delete this upon realizing I couldn't
use nspr stuff in mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D95530
2020-11-02 16:03:04 +00:00
Alexis Beingessner bd3c1f855c Bug 1601286 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95130
2020-11-02 15:05:56 +00:00
Alexis Beingessner 0d1f97e1a4 Bug 1615265 - Backed out changeset 6e297cea9592 and applied proper change. r=decoder
I accidentally got these two mixed up!!

Differential Revision: https://phabricator.services.mozilla.com/D95132
2020-11-02 15:07:02 +00:00
Narcis Beleuzu 115a0628bb Backed out 2 changesets (bug 1674234) for SM bustages on PreXULSkeletonUI.cpp . CLOSED TREE
Backed out changeset 093306c14ca2 (bug 1674234)
Backed out changeset 2684003a37f9 (bug 1674234)
2020-10-31 01:01:33 +02:00
Alexis Beingessner 05c2cbb42e Bug 1607138 - Backed out changeset fb3f09394f1d. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95410
2020-10-30 21:10:08 +00:00
Florian Quèze 313e538484 Bug 1674234 - Add a profiler marker for creating the skeleton UI, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D95219
2020-10-30 20:58:14 +00:00
Gabriele Svelto 863c8dfec7 Bug 1665411 - Use first-fit mutexes on macOS r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D93319
2020-10-30 13:10:29 +00:00
Doug Thayer 30478629cf Bug 1666874 - Support maximized windows for skeleton UI r=agashlin
Most of this patch is a dance to avoid size flickering of the skeleton UI
window. We change all Resize/Move/SetSizeMode calls from before the first
nsWindow::Show call. Normally those have no effect, since the window isn't
shown yet, and if the window is not maximized, they typically match the
sizes we've gotten out of the registry anyway. However, if we are maximized,
then they produce a lot of visual noise. We can however achieve the desired
effect by just calling SetWindowPlacement.

Similarly, we switch the window styles of the skeleton UI window to match those
of the toplevel Windows window, and adjust the client rect from our window proc
in a way that matches the adjustments in nsWindow in the WM_NCCALCSIZE handler.
We do this because otherwise we get a flicker as soon as we change the styles
and nonclient margins as the fake chrome pops up and then back down.

Lastly we also change the extended window styles so that they match. We
historically added WS_EX_TOOLWINDOW here to hide the toolbar entry, because it
would otherwise switch out to a new toolbar entry when we changed the window
styles. However since our new styles match, we no longer need to do this. It
was also causing the maximized window to paint over the Windows taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D93534
2020-10-29 19:04:02 +00:00
Doug Thayer 620dfb6899 Bug 1665455 - Animate the Skeleton UI r=agashlin
For a better user experience during slow startups (and to match the design
by Markus Jaritz), we want to animate the placeholder elements (the grey
rectangles which hold the place of text and icons) with a light moving
gradient.

A question may arise regarding whether the performance cost of running this
animation is worth the improved user experience. My claim is yes, hinging
mostly on the observation that the performance cost is small.

On my machine, one frame of the animation takes at most 0.15ms, and runs
every 16.15ms. This means we eat less than 1% CPU time on one core of the
system. It should also be noted that this animation runs primarily during
the window wherein we are prefetching dlls, AKA while we are blocked on IO
and the CPU is more likely to be idle.

On slower systems, one frame may take longer - however, on slower systems
we should also be blocked *more* by IO, making the trade favorable.

For further anecdotal evidence of this being okay, when I run this on slow
reference hardware shortly after OS startup, I do not see any dropped frames,
indicating that this has very little trouble completing, and is thus quite
cheap.

Regarding testing, I will invoke the same logic as for the rest of the
skeleton UI patches - it would involve quite a bit of work to test this in
automation given our existing frameworks. It may be worth it at some point,
but certainly not while this is a feature that we are just experimenting
with and which is not enabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D91453
2020-10-29 19:03:59 +00:00
Toshihito Kikuchi f0d4e3e5eb Bug 1672357 - Do not reserve all regions in the 32bit virtual space. r=mhowell
One of the scenarios in TestMMPolicy.exe is to reserve all regions but one free
region, and then FindRegion can find that free region.  However, it intermittently
failed to find a free region on 32bit.  Probably a different thread invoked by
the system reserved it before the main thread does.  A proposed fix is to limit
the address range to reserve.

Differential Revision: https://phabricator.services.mozilla.com/D95188
2020-10-29 18:35:32 +00:00
Butkovits Atila 304bfab038 Backed out 2 changesets (bug 1666874, bug 1665455) for causing bustage on PreXULSkeletonUI.cpp. CLOSED TREE
Backed out changeset 967c4cf56fd2 (bug 1666874)
Backed out changeset e46238e6aabf (bug 1665455)
2020-10-29 16:57:35 +02:00
Doug Thayer 38c0351ae3 Bug 1666874 - Support maximized windows for skeleton UI r=agashlin
Most of this patch is a dance to avoid size flickering of the skeleton UI
window. We change all Resize/Move/SetSizeMode calls from before the first
nsWindow::Show call. Normally those have no effect, since the window isn't
shown yet, and if the window is not maximized, they typically match the
sizes we've gotten out of the registry anyway. However, if we are maximized,
then they produce a lot of visual noise. We can however achieve the desired
effect by just calling SetWindowPlacement.

Similarly, we switch the window styles of the skeleton UI window to match those
of the toplevel Windows window, and adjust the client rect from our window proc
in a way that matches the adjustments in nsWindow in the WM_NCCALCSIZE handler.
We do this because otherwise we get a flicker as soon as we change the styles
and nonclient margins as the fake chrome pops up and then back down.

Lastly we also change the extended window styles so that they match. We
historically added WS_EX_TOOLWINDOW here to hide the toolbar entry, because it
would otherwise switch out to a new toolbar entry when we changed the window
styles. However since our new styles match, we no longer need to do this. It
was also causing the maximized window to paint over the Windows taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D93534
2020-10-29 14:09:54 +00:00
Doug Thayer 220a9763bb Bug 1665455 - Animate the Skeleton UI r=agashlin
For a better user experience during slow startups (and to match the design
by Markus Jaritz), we want to animate the placeholder elements (the grey
rectangles which hold the place of text and icons) with a light moving
gradient.

A question may arise regarding whether the performance cost of running this
animation is worth the improved user experience. My claim is yes, hinging
mostly on the observation that the performance cost is small.

On my machine, one frame of the animation takes at most 0.15ms, and runs
every 16.15ms. This means we eat less than 1% CPU time on one core of the
system. It should also be noted that this animation runs primarily during
the window wherein we are prefetching dlls, AKA while we are blocked on IO
and the CPU is more likely to be idle.

On slower systems, one frame may take longer - however, on slower systems
we should also be blocked *more* by IO, making the trade favorable.

For further anecdotal evidence of this being okay, when I run this on slow
reference hardware shortly after OS startup, I do not see any dropped frames,
indicating that this has very little trouble completing, and is thus quite
cheap.

Regarding testing, I will invoke the same logic as for the rest of the
skeleton UI patches - it would involve quite a bit of work to test this in
automation given our existing frameworks. It may be worth it at some point,
but certainly not while this is a feature that we are just experimenting
with and which is not enabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D91453
2020-10-28 19:22:54 +00:00
Alexis Beingessner 7399cf2078 Bug 1607449 - Backed out changeset c5d8b4f34c06 r=decoder
Still an issue, just rare.

Differential Revision: https://phabricator.services.mozilla.com/D95084
2020-10-29 11:50:48 +00:00
Alexis Beingessner f045afd928 Bug 1506910 - Initialize the poison page with a static initializer. r=glandium,decoder
Poison was setup at the start of xpcom init when that was assumed to be early enough.
Since then, Poison was added to Maybe, and Maybe has been used everywhere, including in
our channel implementation. As a result, poison was being used before it was initialized.

This basically meant our poison pointers were being replaced with null instead, which
dances into some more UB than accessing a page we have actually allocated. Also, tsan
noticed that accesses to the value were racing with the initializer actually being
called!

A (dynamic) static initializer forces the poison initialization as we can reasonably
hope without getting CallOnce or singleton patterns involved.

Other changes:
  * Cleaned up the outdated documentation for mozWritePoison (the alignment
    restriction was removed in Bug 1414901)
  * Removed the poison supression from TSan

Differential Revision: https://phabricator.services.mozilla.com/D94251
2020-10-28 20:38:42 +00:00
Alexis Beingessner e70a174ef5 Bug 1608357 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D94856
2020-10-28 15:07:24 +00:00
Alexis Beingessner 9e58a2784e Bug 1607706 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D94855
2020-10-28 13:53:55 +00:00
Alexis Beingessner 7701381612 Bug 1607704 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D94854
2020-10-28 13:53:47 +00:00
Alexis Beingessner be4f23fa57 Bug 1607588 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D94853
2020-10-28 13:53:40 +00:00
Alexis Beingessner b91c79179f Bug 1607138 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D94852
2020-10-28 13:53:38 +00:00
Sebastian Hengst ac330b4b09 Backed out changeset 81c5f8fff63e (bug 1665411) for causing deadlock on older OS X versions (e.g. OS X 10.12), see bug 1673826 2020-10-28 13:37:58 +01:00
Byron Campen [:bwc] bbf349e952 Bug 1657739: Remove temporary suppression. r=decoder
Depends on D94155

Differential Revision: https://phabricator.services.mozilla.com/D94478
2020-10-27 16:37:01 +00:00
Alexis Beingessner 64f2dc8c60 Bug 1615265 - Remove supression for seemingly fixed issue. r=decoder
Depends on D94856

Differential Revision: https://phabricator.services.mozilla.com/D94857
2020-10-27 16:15:46 +00:00
Alexis Beingessner 16866ed6a1 Bug 1607449 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D94859
2020-10-27 16:05:40 +00:00