Fixes an issue where directly converting a string to principal causes the
string to fail to be parsed due to "^" being interpreted as the start of
origin attributes (and the rest of the string isn't able to be parsed as
origin attributes).
Differential Revision: https://phabricator.services.mozilla.com/D63975
--HG--
extra : moz-landing-system : lando
Also adds ScopeToPrincipal function to convert scope nsIURI/strings to principals.
Differential Revision: https://phabricator.services.mozilla.com/D63736
--HG--
extra : moz-landing-system : lando
This patch adds a timer to ServiceWorkerShutdownBlocker in beta/release builds.
The timer, arbitrarily set to 10 seconds, begins once the shutdown blocker
"begins" to block shutdown. When the timer expires, shutdown will be forcefully
unblocked (even if there's still ServiceWorkers that have not completed
shutdown). If all ServiceWorkers shutdown before the timer expires, the timer
callback will be canceled.
All ServiceWorkers should (in theory) shutdown before the timer expires, but
apparently this is not always the case (for currently unknown reasons). So,
it is arguably better from a user-perspective to shutdown uncleanly than stall
and crash when exiting. There also should not be anything unsafe happening as
a result.
Differential Revision: https://phabricator.services.mozilla.com/D63499
--HG--
extra : moz-landing-system : lando
ServiceWorkerRegistration::UpdateState can call content code, which
in turn can result in the registrations getting deleted. This
commit moves the call outside the constructor, so the
registration's creator has a chance to get a proper RefPtr to it.
Differential Revision: https://phabricator.services.mozilla.com/D61706
--HG--
extra : moz-landing-system : lando
The default method implementations cause problems when trying to
override them with different types in a direct call class.
For the `Recv__delete__` case there's a simple solution: omit it if
there are any arguments, because it doesn't make much sense to specify
arguments and then completely ignore them, and the no-arg case isn't a
problem for overriding.
Differential Revision: https://phabricator.services.mozilla.com/D62977
--HG--
extra : moz-landing-system : lando
ScopeContainer provides restricted access to the scopes it contains to maintain
the correct ordering.
Differential Revision: https://phabricator.services.mozilla.com/D62685
--HG--
extra : moz-landing-system : lando
The rejection process consumes the ErrorResult, so an rvalue reference is the honest thing here.
Differential Revision: https://phabricator.services.mozilla.com/D62632
--HG--
extra : moz-landing-system : lando
Behavior changes:
1) We now throw a TypeError, not a SecurityError, when the script URI scheme is
not 'http' or 'https', like the spec says to.
2) We now throw when the scope URI scheme is not 'http' or 'https', like the
spec says to.
3) We now throw a proper TypeError, not a DOMException, at the end of
CheckForSlashEscapedCharsInPath.
4) More informative error messages.
Differential Revision: https://phabricator.services.mozilla.com/D61782
--HG--
extra : moz-landing-system : lando
For some of these I had to take a guess due to lack of familiarity with this
code, so careful review of the actual strings would be much appreciated.
There's still a bunch of code in dom/serviceworkers that constructs a
CopyableErrorResult from just an nsresult, but I don't understand that code well
enough to write good error messages.
Differential Revision: https://phabricator.services.mozilla.com/D61201
--HG--
extra : moz-landing-system : lando
I think the current code made us filter out all the carefully crafted TypeError
messages we might have reported...
Differential Revision: https://phabricator.services.mozilla.com/D61198
--HG--
extra : moz-landing-system : lando
Replace all implicit copies by moves, or explicit clone operations.
Fixed a bug in /home/simon/work/ipdl/ipc/ipdl/ipdl/lower.py _cxxConstRefType,
which caused the const accessor to miss const on its return type for a moveonly
struct member.
Removed unused using directives for SerializedStructuredCloneBuffer in ipdl files.
Differential Revision: https://phabricator.services.mozilla.com/D59742
--HG--
extra : moz-landing-system : lando
Replace all implicit copies by moves, or explicit clone operations.
Fixed a bug in /home/simon/work/ipdl/ipc/ipdl/ipdl/lower.py _cxxConstRefType,
which caused the const accessor to miss const on its return type for a moveonly
struct member.
Removed unused using directives for SerializedStructuredCloneBuffer in ipdl files.
Differential Revision: https://phabricator.services.mozilla.com/D59742
--HG--
extra : moz-landing-system : lando
MainThreadWorkerControlRunnable::Cancel (indirectly) calls WorkerRun, which is
neither intuitive nor documented, but UpdateStateOpRunnable needs to account for
that to avoid a release assertion failure in ServiceWorkerOpArgs::AssertSanity.
Differential Revision: https://phabricator.services.mozilla.com/D61282
--HG--
extra : moz-landing-system : lando
ServiceWorkerShutdownState encapsulates the shutdown progress for a particular
ServiceWorker. The shutdown process involves a "shutdown message" passing
multiple threads in both parent/content processes; we report a progress update
when it's known that a shutdown message has reached a particular thread. The
idea is that in the event of a shutdown timeout, ServiceWorkerShutdownBlocker
will be able to provide diagnostics for where shutdown processes are stalled.
Differential Revision: https://phabricator.services.mozilla.com/D60791
--HG--
extra : moz-landing-system : lando
ServiceWorkerShutdownState encapsulates the shutdown progress for a particular
ServiceWorker. The shutdown process involves a "shutdown message" passing
multiple threads in both parent/content processes; we report a progress update
when it's known that a shutdown message has reached a particular thread. The
idea is that in the event of a shutdown timeout, ServiceWorkerShutdownBlocker
will be able to provide diagnostics for where shutdown processes are stalled.
Differential Revision: https://phabricator.services.mozilla.com/D60791
--HG--
extra : moz-landing-system : lando
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'
Further manual fixups and cleanups to the include order incoming.
Differential Revision: https://phabricator.services.mozilla.com/D60323
--HG--
extra : moz-landing-system : lando
Attempting to narrow down the crash of a null ServiceWorkerRegistrationInfo.
Differential Revision: https://phabricator.services.mozilla.com/D60326
--HG--
extra : moz-landing-system : lando
This patch allows ExtendableEvent.waitUntil to be successfully called while
an ExtendableEvent is being dispatched. Initially, calls would fail if the
internal "pending promises count" reached zero during a microtask checkpoint
in between two event handler invocation tasks. This patch add the additional
condition that the dispatch flag must be unset for subsequent calls to fail.
Differential Revision: https://phabricator.services.mozilla.com/D59938
--HG--
extra : moz-landing-system : lando
This test contains a few race conditions that could cause it to
hang and time out. This commit removes them, hopefully solving the
intermittent failures.
Differential Revision: https://phabricator.services.mozilla.com/D59918
--HG--
extra : moz-landing-system : lando
This gives each ServiceWorker a total of 1 minute to finish doing "something"
(unless the timeout is reset by something else the ServiceWorker needs to do).
1 minute is chosen to be roughly consistent with Chrome/Safari (as opposed to
a total of 5 minutes 30 seconds).
Differential Revision: https://phabricator.services.mozilla.com/D59245
--HG--
extra : moz-landing-system : lando
* Makes it possible to selectively enable TRR for pbmode/container/window/etc
Differential Revision: https://phabricator.services.mozilla.com/D48363
--HG--
extra : moz-landing-system : lando
- Cleaned up some comments.
- Changed some const nsACString& parameter types to nsCString to accept r-value
and l-value nsCStrings.
Differential Revision: https://phabricator.services.mozilla.com/D58877
--HG--
extra : moz-landing-system : lando