Summary:
We are not passing a tab here. It only works by chance!
Depends On D4535
Reviewers: yulia!
Tags: #secure-revision
Bug #: 1485676
Differential Revision: https://phabricator.services.mozilla.com/D4536
MozReview-Commit-ID: K0ztxPM2N6A
This patch makes the parser-worker available at the toolbox level.
This way, the console does not have to rely on the debugger being
open to map top-level await expression.
In order to make the worker works in the toolbox, some changes
are required (passing a window object, checking inToolbox differently).
We take this as an opportunity to *not* display the async iife result,
a promise, in the console. This is made by checking if the input was
mapped, and if so, ignoring the result we get from the server.
A couple tests are added to ensure the basic usage works as expected.
This patch should be considered as a v0 for top-level await evaluation
as there are things that are not perfect here. Since we rely on console.log
the result are treated differently from other evaluation results:
- the style is different
- the result gets added to the log cache (when restarting the console,
the results will still be displayed, but not the commands).
- the results can be filtered, although evaluation results should not
- `$_` after a top-level await evaluation returns the Promise created
by the async iife, not the result that was displayed in the console.
All those should be addressed in Bug 1410820.
Differential Revision: https://phabricator.services.mozilla.com/D6038
--HG--
extra : moz-landing-system : lando
Summary:
This method isn't specific to tabs. It can attach to any "target" actor that inherits from BrowsingContextActor.
Depends On D6161
Reviewers: yulia!
Tags: #secure-revision
Bug #: 1485676
Differential Revision: https://phabricator.services.mozilla.com/D6162
MozReview-Commit-ID: Exz5fWyWyfN
Summary:
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.
Depends On D4078
Reviewers: yulia!
Tags: #secure-revision
Bug #: 1485676
Differential Revision: https://phabricator.services.mozilla.com/D6161
MozReview-Commit-ID: KmFi1LIUBga
Summary:
When switching to async, it is important to catch exception or register a rejection handler
so that errors keep being logged.
So in this patch I'm catching exception in a couple of important codepath.
Depends On D4541
Reviewers: yulia!
Tags: #secure-revision
Bug #: 1485676
Differential Revision: https://phabricator.services.mozilla.com/D4542
MozReview-Commit-ID: IDPJVkAPbTs
Summary:
Fetching any target is now asynchronous. But RDM setup/destroy codepath is very fragile
and introduce many low level exception when trying to restore the original browser element
if any timing changes.
So this patch prevents trying to fetch the target object if a toolbox isn't already opened.
The target object is being used only for Telemetry purpose for now.
Depends On D4538
Reviewers: yulia!
Tags: #secure-revision
Bug #: 1485676
Differential Revision: https://phabricator.services.mozilla.com/D4540
MozReview-Commit-ID: 2QDUNqentMP
Summary:
We are not passing a tab here. It only works by chance!
Depends On D4535
Reviewers: yulia!
Tags: #secure-revision
Bug #: 1485676
Differential Revision: https://phabricator.services.mozilla.com/D4536
MozReview-Commit-ID: K0ztxPM2N6A
And remove the ADBScanner once the extension is uninstalled.
When RuntimeScanners.add is called for ADBScanner, RuntimeScanner calls
ADBScanner.enable(), thus ADB.start() is called. Meanwhile WebIDE installs the
devtools adb extension if the extension hasn't installed yet. So if the
ADB.start() is called before the installation finishes, ADB.start() fails.
Differential Revision: https://phabricator.services.mozilla.com/D6466
--HG--
extra : moz-landing-system : lando
This method isn't specific to tabs. It can attach to any "target" actor that inherits from BrowsingContextActor.
Depends On D6161
Differential Revision: https://phabricator.services.mozilla.com/D6162
--HG--
extra : moz-landing-system : lando
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.
Depends On D4078
Differential Revision: https://phabricator.services.mozilla.com/D6161
--HG--
extra : moz-landing-system : lando
When switching to async, it is important to catch exception or register a rejection handler
so that errors keep being logged.
So in this patch I'm catching exception in a couple of important codepath.
Depends On D4541
Differential Revision: https://phabricator.services.mozilla.com/D4542
--HG--
extra : moz-landing-system : lando
Fetching any target is now asynchronous. But RDM setup/destroy codepath is very fragile
and introduce many low level exception when trying to restore the original browser element
if any timing changes.
So this patch prevents trying to fetch the target object if a toolbox isn't already opened.
The target object is being used only for Telemetry purpose for now.
Depends On D4538
Differential Revision: https://phabricator.services.mozilla.com/D4540
--HG--
extra : moz-landing-system : lando
We are not passing a tab here. It only works by chance!
Depends On D4535
Differential Revision: https://phabricator.services.mozilla.com/D4536
--HG--
extra : moz-landing-system : lando
This patch will:
- Call the children as function when rendering if MenuButton's children property is the function.
- Add the callback which is called when the focused item changed.
Differential Revision: https://phabricator.services.mozilla.com/D6352
--HG--
extra : moz-landing-system : lando
This patch will move the global functions of ToolboxToolbar to its local
function. As a result of this changes, each function can refer 'props' from
'this' scope.
Differential Revision: https://phabricator.services.mozilla.com/D4631
--HG--
extra : moz-landing-system : lando
Because firefox can be closed with the toolbox in a half initialized state telemetry can throw if it expects a tool to be closing when no tools are fully initialized although this is completely expected. Here we simply choose not to report those errors because this is expected behaviour.
Differential Revision: https://phabricator.services.mozilla.com/D4869
--HG--
extra : moz-landing-system : lando
This fixes a performance issue when a page has media-queries based
on the width of the viewport, and the user resizes the window.
If you have N media-queries impacted by a size change:
- each MediaRule will fire "matches-change" (so N events)
- for each "matches-change" the StyleSheetEditor.jsm responsible
for it will fire "media-rules-changed" (still N events)
- for each "media-rules-changed" StyleEditorUI.jsm will call
_updateMediaList to redraw the media queries sidebar for this editor
- for each rule in the editor _updateMediaList will call
getOriginalLocation using the sourcemap service (so N * N calls)
which will spawn an async task, a worker etc...
This is the "good" scenario if only one original file contains all
the N media queries. But if they are split amongst M original files,
each StyleSheetEditor will have and watch all the mediaRules of the
original file, even if it only displays its own part. They are
filtered later on in _updateMediaList (by calling getOriginalLocation).
Which means that in the end you get M * N * N calls to getOriginalLocation.
Throttling calls to media-rules-changed is an easy way to reduce the number
of actual calls to getOriginalLocation.
Differential Revision: https://phabricator.services.mozilla.com/D5347
--HG--
extra : moz-landing-system : lando
This makes long strings without spaces wrap in the console output.
Also fixes object with long string properties.
Differential Revision: https://phabricator.services.mozilla.com/D6040
--HG--
extra : moz-landing-system : lando