When we let the WebIDL callback wrapper report exceptions, it returns an error
result of NS_ERROR_UNEXPECTED, which winds up getting set as a promise
rejection reason or re-reported to the console. This just causes unnecessary
confusion for callers, especially since the error has no location information.
Differential Revision: https://phabricator.services.mozilla.com/D57657
--HG--
extra : moz-landing-system : lando
Changes:
Run mochitest-webgl suites on ubuntu1804.
Update the expectation of a test to remove the `headless` specification.
Differential Revision: https://phabricator.services.mozilla.com/D59401
--HG--
extra : moz-landing-system : lando
In StartDocumentLoad we copy the securityInfo reference from the load channel into a document
member variable. This used to happen only for HTML documents, but other documents (e.g. media)
can be loaded via secure channels, too and thus should have securityInfos. We're using the
securityInfo object to display information in the UI, which would previously fail for images and videos.
Differential Revision: https://phabricator.services.mozilla.com/D59327
--HG--
extra : moz-landing-system : lando
After XPCOM is shutdown, `sBrowsingContext` would be released, so using `BrowsingContext::Get()` would cause crash. Therefore, after shutdown XPCOM, we should not access browsing context.
Differential Revision: https://phabricator.services.mozilla.com/D59079
--HG--
extra : moz-landing-system : lando
- Make the worker thread's associated WorkerPrivate available from
RemoteWorkerChild' "Pending" state (which is the state while the script
is evaluating). WorkerPrivate is needed to forcefully terminate the worker,
and previously it wasn't available until the script finished evaluating, so
a script like `while (true);` wouldn't be able to be stopped because its
WorkerPrivate wouldn't ever be available.
- Refactor some RemoteWorkerChild states to clean up WorkerPrivate/WeakWorkerRef.
Differential Revision: https://phabricator.services.mozilla.com/D59246
--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
* Revert some partial webgl+oop+vr code.
* More missing FuncScope.
* Fix compile errors.
* Refactor some ifdef'd code to branch and compile on all platforms.
* -Wno-error=unused-result for GCC to allow for (void)MustUse().
Depends on D55739
Differential Revision: https://phabricator.services.mozilla.com/D56169
--HG--
extra : moz-landing-system : lando
(This is a combination of 31 commits)
* Fix Linux compilation.
* Fix mac compilation.
* CI compile fixes.
* printf's size_t is %zu. %tu would be unsigned ptrdiff_t.
* No non-ref Maybe args.
* MOZ_CRASH for noreturn
* Handle implied texture sizes, rewrite comment stripping.
* Replace e.g. WebGLProgramInner with simpler webgl::ProgramKeepAlive.
* Bounce ValidateProgram call off driver.
* Uniform name length limit, cubemap fb-attach, non-array uniforms, undersized texImage views.
* alignas for uint8_t[sizeof(float)*N] pun buffers.
* CC fixes?
* Fill attrib0Active.
* Repair max-warnings limit.
* This is basically required in order for CI's logging to not explode.
* Don't cache WebGLMemoryTracker.
* Deleted prog/shader error, no texSubImage(null), client-side fingerprint resist for exts.
* Fix GetUniformIndices and MakeRangeFromView.
* CC Traverse base class from within derived class to fix leaking the world. :(
* PauseTransformFeedback
* TexImage video fastpath
* GetFragLocation for arrays
* Forbid BindBufferRange during TF
* Mark tests and fix RBAB query and test.
* Change(!) query deletion behavior to match spec.
* Mark conformance2/query/query.html failing for now.
* Implicitly EndQuery on DeleteQuery while spec is in flux.
* Fix error code for test.
* RAII LruPosition for WebGL context limit.
* Include std::list.
* Mark CompileResult and LinkResult.pending as false when retrieved.
* Hold strong-ref to NotLostData during Run<> to prevent LoseContext=>UAF.
* Don't assume GetUniformLocation(foo+'[0]') means foo is an array.
* Don't assume !mCanvasElement means !!mOffscreenCanvas.
* Handle composition while context-lost.
* All non-value-init members must be const or have inline init.
* Mark passing tests on Linux.
Depends on D54019
Differential Revision: https://phabricator.services.mozilla.com/D55739
--HG--
extra : moz-landing-system : lando
* Context loss using RAII
* Move Program reflection Client-side
Depends on D54018
Differential Revision: https://phabricator.services.mozilla.com/D54019
--HG--
extra : moz-landing-system : lando
Splits WebGLContext into ClientWebGLContext and HostWebGLContext. The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process. At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.
Differential Revision: https://phabricator.services.mozilla.com/D54018
--HG--
extra : moz-landing-system : lando
Automatic but manually checked via s/IsBaseOf</std::is_base_of</g and so on.
Differential Revision: https://phabricator.services.mozilla.com/D59145
--HG--
extra : moz-landing-system : lando
Under some (yet) unclear conditions it's possible for a content
process to send session storage data for a browsing context that's
already been discarded. This leads to an assertion failure when
deserializing the IPC message. This commit works around this issue
by sending the browsing context's ID over IPC and issuing a warning
instead of asserting that the browsing context still exists.
Differential Revision: https://phabricator.services.mozilla.com/D59096
--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
Note that this also implicitly adds support for the view-source+srcdoc configuration, and setting of the BaseURI, which were both in the nsDocShell version but not the others.
Differential Revision: https://phabricator.services.mozilla.com/D57887
--HG--
extra : moz-landing-system : lando
It's possible that `self` is the last pointer holding the media cache, so we have to ensure releasing `self` on main thread because media cache should always be destroyed on main thread only.
Differential Revision: https://phabricator.services.mozilla.com/D58900
--HG--
extra : moz-landing-system : lando
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.
Also deindent Servo_ComputeColor while touching it.
Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).
Differential Revision: https://phabricator.services.mozilla.com/D58687
--HG--
extra : moz-landing-system : lando
This patch contains three changes, but we just simpliy the logic, the result is the same,
1). s/oldTopLevelScopeOwner/currentTopLevelScopeOwner/
We can use either `oldTopLevelScopeOwner` or `currentTopLevelScopeOwner` in if-check, they point to the same element at that point.
Using `currentTopLevelScopeOwner` is clearer given that it is updated in the if-block.
2). remove else-block
We run into this else-block when `aForward && oldTopLevelScopeOwner == currentContent`,
so `oldTopLevelScopeOwner`, `currentTopLevelScopeOwner` and `currentContent` all point to the same element.
It is not necessary to set `currentTopLevelScopeOwner` to `currentContent` again.
3). s/IsHostOrSlot(currentTopLevelScopeOwner)/currentTopLevelScopeOwner/
After above two changes, `currentTopLevelScopeOwner` is always set to result of `GetTopLevelScopeOwner(currentContent)`,
so we don't need `IsHostOrSlot()` checks. And there is an asserion in `HostOrSlotTabIndexValue()` to ensure it is either a host or slot.
Differential Revision: https://phabricator.services.mozilla.com/D58810
--HG--
extra : moz-landing-system : lando
Currently if we call `GetTopLevelScopeOwner` with a <slot> which is in top-level-scope, e.g. `<body><slot></slot></body>`.
It returns <slot> itself, but it should returns `nullptr` per design.
Differential Revision: https://phabricator.services.mozilla.com/D58805
--HG--
extra : moz-landing-system : lando
After bug 1544826, `FindOwner` returns only shadow host or slot, update the
comment and rename it to `FindScopeOwner` to reflect the current behavior.
Differential Revision: https://phabricator.services.mozilla.com/D58578
--HG--
extra : moz-landing-system : lando