This patch fixes a leak that I spotted while investigating a separate shutdown leak triggered by D121683
(This one is not strictly related to D121683, but apparently none of the xpcshell tests part of this
stack of patches reported it at a shutdown leak, nevertheless it was detected as a shutdown leak
while running the test_ext_identity.html mochitest on the background service worker, after
the other leak specific to D121683 was fixed, and after investigating it using cc logs and heapgraph's
find_roots.py I confirmed that it's a shutdown leak introduced here in RequestWorkerRunnable::ProcessHandlerResult).
Differential Revision: https://phabricator.services.mozilla.com/D122968
This patch is a test-only follow up to part 8.2, both of the TODOs added in part 8.2 and removed in this patch
depends from the changes introduced in "part 10.1", "part 10.22" and "part 10.3" right before this one.
This patch adds an additional assertion to the smoke tests for the runtime API part of
test_ext_webidl_api_request_handler.js to confirm that the ExtensionPort instance received as the
last parameter of the port.onMessage listener is strictly equal to the `port` the listener was
added on.
Differential Revision: https://phabricator.services.mozilla.com/D122967
The extensions expect that ExtensionPort instances they get in the calls to the
port event listeners to always be the same, and to be also strictly equal to the
object port got from browser.runtime.connect or browser.runtime.onConnect:
```
const port = browser.runtime.connect();
port.onDisconnect.addListener(disconnectedPort => {
// port === disconnectedPort => true
});
```
This patch does add an extension port lookup map in the ExtensionBrowser
class and a new ExtensionBrowser::GetPort method which is responsible of
providing the expected behavior (returning an existing istance if one is
found in the lookup map).
Differential Revision: https://phabricator.services.mozilla.com/D107554
This patch does:
- add to ExtensionBrowser two new data members to keep track of value for the browser.runtime.lastError and if it was checked while
the chrome compatible callback was being executed
- add to ExtensionBrowser 3 new methods to set, get and clear the lastError value
- add a reference to the ExtensionBrowser to all API namespaces and API objects classes, because it has to be then propagated to the
ChromeCompatCallbackHandler instances that are being attached to the promise result of the async API methods calls if the caller did
pass the optional callback parameter
- tweak the ChromeCompatCallbackHandler class to set the lastError value before calling the callback in ChromeCompatCallbackHAndler::RejectedCallback
and then clear it after the call has been completed and report it to the console if it wasn't checked
- change the ExtensionRuntime::GetLastError methhod to restrieve and return the value from the ExtensionBrowser instance
Differential Revision: https://phabricator.services.mozilla.com/D107327
This is currently a temporary quick approach to more quickly verify the
worker child context with a sample of API calls proxied to the main process
(currently using the alarms API, as it is pretty small and simple).
It is likely better for this patch to create a new parent context that is specifically
meant to be used for the worker proxied contexts.
Differential Revision: https://phabricator.services.mozilla.com/D86203
The correct name for an externref is 'externref', not 'anyref'.
The correct name for a generic function in a global is 'anyfunc', not 'funcref'.
Since js-types is a nightly-only feature for now, add FAIL expectations for beta and release
for the type() method on globals and tables.
Correct a typo in a test case.
Differential Revision: https://phabricator.services.mozilla.com/D127616
Clone will make the ProfilerTime easier to use. And {add,subtract}_microseconds
implementations are helpful when you need to subtract/add some duration before
adding a marker. There is a similar code in the Webrender marker code, and this
will allow them to use the new API instead of some custom code.
Differential Revision: https://phabricator.services.mozilla.com/D127111
`gfxVars::UseWebRender()` now always returns `true`, thus stop passing
it around as argument. And as HW-WR unconditionally requires an alpha
channel, remove that from the code as well.
While on it, also stop requesting a depth buffer. It's not needed any
more after D113532 and D115216.
Finally, some small drive-by cleanups.
Differential Revision: https://phabricator.services.mozilla.com/D126922
If we pinch zoomed with an oop iframe the font would not take into account the pinch zoom because GetCumulativeResolution in the child process was 1.
This fix also takes into account the scale from css transforms. This is notable because in non-fission cases (fission turned off, or not in an oop iframe) we do not take into account css transforms, even after this patch. (We target the correct word, but the highlight that is drawn can be at the wrong place and have the wrong size.)
Differential Revision: https://phabricator.services.mozilla.com/D126862
this.browser in toolkit/actors/ControllersParent.jsm is the top level browser, ie the browser holding the root content document. So the conversion that happens in that file converts the coordinates to be relative to the root content document, but they need to be relative to the root of whichever child process we are sending the event to.
The best way I found out how to do this was to pass the coords down to the child process still relative to the parent process widget and then in the child process use the child to parent transform matrix to make them relative to the root widget in the child process.
I needed a new nsIDOMWindowUtils functions because I don't think there is anything existing to do this.
Differential Revision: https://phabricator.services.mozilla.com/D126861
The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.
Differential Revision: https://phabricator.services.mozilla.com/D127215
This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).
Differential Revision: https://phabricator.services.mozilla.com/D127214