Because mozilla::HashSet is much faster than PLDHashTable, and mPtrToNodeMap is
hot.
--HG--
extra : rebase_source : bd861a1cd07ae27f4d18ce5c01ca40c5bb73c035
Set the "network.trr.disable-ECS" pref to false to disable.
MozReview-Commit-ID: GE6L8Vpvuu0
Differential Revision: https://phabricator.services.mozilla.com/D2933
--HG--
extra : moz-landing-system : lando
The default character set that is used to read sub-scripts using
`mozJSSubScriptLoader` is ASCII. Scripts for Activity Stream contains strings
which are encoded in UTF-8, and therefore, reading them in ASCII will display
the strings incorrectly.
Differential Revision: https://phabricator.services.mozilla.com/D3160
--HG--
extra : moz-landing-system : lando
In the genuine adb binary, when it received 'host:kill' command, it exits the
server process soon [1]. Whereas, in our mock adb.py which is based on
SocketServer.TCPServer in python, when we call
SocketServer.TCPServer.shutdown() in the case of 'kill-server' command, the
server process doesn't exit soon since the shutdown() function just sets a
flag [2] and serve_forever() polls it [3] every |poll_interval| seconds,
|poll_interval| is 0.5 seconds by default. Thus it's possible that new incoming
requests are processed during polling.
This is the real cause of the race condition that the adb server still keeps
alive when 'adb kill-server' finished. So we don't need to the workaround
for the race condition.
[1] 4039051d6d/adb/adb.cpp (1049)
[2] 65b5ef02ec/Lib/socketserver.py (L248)
[3] https://docs.python.org/2/library/socketserver.html#SocketServer.BaseServer.serve_forever
Differential Revision: https://phabricator.services.mozilla.com/D3169
This icon is copied from the common globe icon, except that it supports
context-fill.
Differential Revision: https://phabricator.services.mozilla.com/D3097
--HG--
extra : rebase_source : fb33161d0dead6a42566cdd3c95df8216a607811
This patch introduces a new preference:
devtools.aboutdebugging.network-locations
- this preference is a string pref, that should be a stringified
JavaScript array.
- the default value is "[]".
- the module supports getting, adding, removing and observing
network locations.
Differential Revision: https://phabricator.services.mozilla.com/D3096
--HG--
extra : rebase_source : c167a689bccda547f12b4970775c2e7feab49553
In order to reuse the button and ellipsis styles in the Connect page,
I would like to move the corresponding styles to a common stylesheet.
Differential Revision: https://phabricator.services.mozilla.com/D3095
--HG--
extra : rebase_source : 4a2eef73edf9b648776dbb3c6ba094160f4e99e8
Avoid processing anon content in nsCanvasFrame, then getting more anon content
via AccessibleCaretEventHub::Init. Instead call Init before creating the custom
content container. We could also throw a script runner at it I guess, but this
prevents the reentrancy issue.
Avoid cloning nodes during layout, just use the same node (already cloned in
InsertAnonymousContent) instead.
The RemoveChild in GetAnonymousContent to handle the reframes instead of cloning
around is a bit hacky, but I don't think it's really worth extending
PostDestroyData for this special case.
Differential Revision: https://phabricator.services.mozilla.com/D1889
For making it possible to distinguish if HTMLEditor::RemoveInlineProperty() is
called by outer class or editor itself, this patch creates
Create HTMLEditor::RemoveInlinePropertyInternal() and makes the internal
callers use this new method.
Differential Revision: https://phabricator.services.mozilla.com/D3000
--HG--
extra : moz-landing-system : lando
For making it possible to distinguish if SetInlineProperty() is called by outer
class or the editor itself, this patch creates SetInlinePropertyInternal().
Additionally, this makes the first argument of SetInlineProperty() from
nsAtom* to nsAtom& since it's not nullable.
Differential Revision: https://phabricator.services.mozilla.com/D2999
--HG--
extra : moz-landing-system : lando
User may paste a lot with pressing Accel+V for a while (i.e., with auto repeat).
So, calling nsIEditor::Paste() may be in a hot path and we can now make
non-virtual public method with AsHTMLEditor().
Differential Revision: https://phabricator.services.mozilla.com/D2993
--HG--
extra : moz-landing-system : lando
HTMLEditor::Paste() is an override of nsIEditor. So, it's virtual and public.
We should use protected method for internal use and should make it non-virtual
if possible. This patch creates PasteInternal() which is a protected
non-virtual method.
Differential Revision: https://phabricator.services.mozilla.com/D2992
--HG--
extra : moz-landing-system : lando
Entry storage allocation now occurs on the first lookupForAdd()/put()/putNew().
This removes the need for init() and initialized(), and matches how
PLDHashTable/nsTHashtable work. It also removes the need for init() functions
in a lot of types that are built on top of mozilla::Hash{Map,Set}.
Pros:
- No need for init() calls and subsequent checks.
- No memory allocated for empty tables, which are not that uncommon.
Cons:
- An extra branch in lookup() and lookupForAdd(), but not in put()/putNew(),
because the existing checkOverloaded() can handle it.
Specifics:
- Construction now can take a length parameter.
- init() is removed. Explicit length-setting, when necessary, now occurs in the
constructors.
- initialized() is removed.
- capacity() now returns zero when the entry storage is absent.
- lookupForAdd() is no longer `const`, because it can instantiate the storage,
which requires modifications.
- lookupForAdd() can now return an invalid AddPtr in two cases:
- old: hashing failure (due to OOM in the hasher)
- new: OOM while instantiating entry storage
The existing failure handling paths for the old case work for the new case.
- clear(), finish(), and clearAndShrink() are replaced by clear(), compact(),
and reserve(). The old compactIfUnderloaded() is also removed.
- Capacity computation code is now in its own functions, bestCapacity() and
hashShift(). setTableSizeLog2() is removed.
- uint32_t is used throughout for capacities, instead of size_t, for
consistency with other similar values.
- changeTableSize() now takes a capacity instead of a deltaLog2, and it can now
handle !mTable.
Measurements:
- Total source code size is reduced by over 900 lines. Also, lots of existing
lines got shorter (i.e. two checks were reduced to one).
- Executable size barely changed, down by 2 KiB on Linux64. The extra branches
are compensated for by the lack of init() calls.
- Speed changed negligibly. The instruction count for Bench_Cpp_MozHash
increased from 2.84 billion to 2.89 billion but any execution time change was
well below noise.