Due to the history of how nsString was implemented, many APIs ended up being
implemented in inappropriate files. This change moves simple definitions which
won't require any changes for each type to happen within that type's .cpp file.
This is necessary to eventually enable the directory to be built without
unified builds.
Differential Revision: https://phabricator.services.mozilla.com/D148298
This type was introduced in c++17, and can be used as a convenient standard
medium for passing around borrowed substring references. It can be implicitly
converted to from string literals and `const char_type*`, meaning that after
this change it can be used as a convenient catch-all type to replace seperate
overloads for `const self_type&`, `const char_type*` and `const
char_type(&)[N]`.
std::basic_string_view also provides standard implementations of some
algorithms which will be convenient for code cleanup in later parts of this
bug.
Differential Revision: https://phabricator.services.mozilla.com/D148297
This file only exists as a wrapper around nsTSubstring.cpp, with some methods
left in it due to how the string types were defined before they were turned
into templates.
Differential Revision: https://phabricator.services.mozilla.com/D148296
Destroying the IAudioSessionControl has concurrency issues with audio playback that require it to be done on the main thread. We have been trying to create a new AudioSessionControl on a background thread while this happens but some AudioSessionControl internals/dependencies are not thread safe. In order to avoid concurrency crashes, we destroy the old IAudioSessionControl on the main thread, then dispatch the restart to a background (MTA) thread asynchronously.
Differential Revision: https://phabricator.services.mozilla.com/D152302
A deadlock issue with our main thread audio playback handling arises when we try to destroy the AudioSessionControl from the MTA, despite it being an MTA object. We therefore dispatch its destruction to the main thread (STA) so the deadlock is impossible. In order to use it from the STA, we should wrap it in an AgileReference.
Differential Revision: https://phabricator.services.mozilla.com/D152301
Concurrent operations in the MTA make the required lifetime of the AudioSession complex. In particular, it cannot be known when/if any methods are currently queued or being executed (in particular, Start). In order to make this safe, we keep the AudioSession at least as long as XPCOM is running background threads.
This patch also removes a long-defunct state machine and does some basic code cleanup.
Differential Revision: https://phabricator.services.mozilla.com/D152300
Previously when closing the breakpoints panel in secondary panes,
if an unselected call stack frame was selected, the breakpoints
panel would unexpectedly open. This patch makes sure it remains
closed when a user has closed it and then clicks other elements
in the secondary panes. The same issue was happening when
clicking the event listener breakpoint log checkbox, and or step
in, step out, and step over. This patch should also fix
Bug 1755337.
Add mochitest.
Fix mochitest issues and move isFrameSelected to shared-head.js
Fix linting issues.
Merge new mochitests into browser_dbg-state-based-panels.js
Add condition to SecondaryPanes/index.js
Add PropTypes to index.js
Add logic to reducers/pause.js
Add selector to selectors/pause.js
Add breakpointsPane action to pause/actions
Update mochitests to test for edge case
Remove dbg_browser-breakpoints-secondary-pane.js
Fix linting
Make changes suggest by reviewer
Add additional mochitest for event breakoints log
Remove unnecessary parameters from action
Fix mozbuild order
Remove previewPausedLocation.js from mozbuild to fix conflict
Differential Revision: https://phabricator.services.mozilla.com/D149994
This means we can include these files in other binaries when we need earlier
access to the process type and use consistent code.
Differential Revision: https://phabricator.services.mozilla.com/D152198
- Don't delete layer manager when nsWindow is unrealized but leave that to Destroy() when it's actually deleted.
Only disable rendering in ReleaseGdkWindow().
- Create msWindow with enabled composition
- Use single nsWindow::ConfigureCompositor() routine to configure compositor and use it from
ConfigureGdkWindow() and SetCompositorWidgetDelegate().
Depends on D153206
Differential Revision: https://phabricator.services.mozilla.com/D153207
In this patch, we make gfxFont use normal AddRef/Release semantics, and
instead now hold a strong reference to it inside the cache. At all times
a font should be in the expiration tracker, and whenever a lookup is
performed, we mark it as used.
When the tracker attempts to expire an entry, we check to see if the
only strong reference is inside the cache itself. If so, it is deleted.
If not, we mark it as used again instead of expiring it.
This has the advantage of making gfxFont::Release cheaper when there is
only one outstanding reference left outside the cache. It used to
acquire the gfxFontCache mutex in order to reinsert the font into the
expiration tracker when the last strong reference was cleared. This is a
very common case since the typical use case is only the main thread is
interacting with the cache, one font reference at a time.
This does not completely restore us to the previous performance
observed, but it does reclaim half of the original design benefit while
remaining threadsafe.
Differential Revision: https://phabricator.services.mozilla.com/D153110
We pass `isModeSwitching` to `unwatchTargets` from the target command when the
pref is changed.
On the server, we then pass it to the various places which might call `notifyTargetDestroyed`,
so we can pass the flag in the `target-destroyed-form` event, which we can then
pass to TargetCommand#onDestroyed callbacks.`
Differential Revision: https://phabricator.services.mozilla.com/D152758
Changes in Bug 1754407 caused a performance regression as it now triggered
syntax highlighting of big files, which we avoided before.
This is because we don't call `isMinified` with the expected type of data, causing
the file to not be seen as minified, and thus highlighting it.
Differential Revision: https://phabricator.services.mozilla.com/D153140
These don't get styles early enough to make a shadow decision before Show().
This also matches the previous behavior (nothing would set
nsWidgetInitData::mDropShadow for these windows), so this is the less risky
fix.
It seems somewhat sketchy to use a popup window for these to begin with (Linux
for example maps them to a toplevel Window, at least on Wayland...), but let's
not change too much right now.
The hbrBackground change is a no-op because we can't have a brush before
Create() is called, we update it in SetBackgroundColor().
Differential Revision: https://phabricator.services.mozilla.com/D153095
This patch adds the ability to skip tests to Talos. This lets us prevent tests from running depending on which branch we are on. It also adds some code that will skip tests on the pine branch.
Differential Revision: https://phabricator.services.mozilla.com/D152513