Closed
Bug 1217591
Opened 9 years ago
Closed 9 years ago
Make JS autocompletion in the console work inside of a worker toolbox
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(firefox44 fixed)
RESOLVED
FIXED
Firefox 44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: bgrins, Assigned: bgrins)
References
Details
Attachments
(2 files)
(deleted),
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
Once bug 1215117 lands, we will have basic entry into the console. However autocompletion doesn't work because we don't attempt to load webconsole utils from the worker. We should probably break the JSPropertyProvider object into it's own file that's worker-safe so it can be loaded in that context.
Assignee | ||
Comment 1•9 years ago
|
||
This is blocked by Bug 1025778 since it's touching the same test that is refactored there
Blocks: 1025778
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Summary of changes:
1) Did `hg cp devtools/shared/webconsole/utils.js devtools/shared/webconsole/js-property-provider.js` and then removed all non autocompletion stuff from the new file. This makes the diff here more noisy but it should preserve VCS history.
1a) I gave a workaround in the new file for when it's loaded in a worker (it doesn't try to load Parser.jsm in that case for matching strings, array literals, etc). I think if we switch to acorn for tokenizing instead in this case (bug 1217198) we can re-add that support in workers.
2) Removed all autocompletion stuff from utils.js
Note this won't apply without the patches from Bug 1025778 and Bug 1215117 applied (both of which are in review).
The test changes are in a part 2 patch
Attachment #8678331 -
Flags: review?(nfitzgerald)
Assignee | ||
Comment 3•9 years ago
|
||
Summary of changes:
1) Add a mechanism in /shared/webconsole/test/common.js to attach a console to a worker. Since this ended up adding yet another random param to attachConsole (yuck), I pulled this out into a few functions that smooth over that (attachConsole, attachConsoleToTab, and attachConsoleToWorker)
2) Pull the autocompletion stuff out from test_jsterm.html and into a new test_jsterm_autocomplete.html
2a) Part of this required changing the setting of top.foo into a string to be evaluated by the webconsole so we could modify the global state in a worker as well for testing
2b) This new test now runs two configurations, once in a tab and once in a worker just to make sure that's working.
Attachment #8678335 -
Flags: review?(nfitzgerald)
Comment 4•9 years ago
|
||
Comment on attachment 8678331 [details] [diff] [review]
console-autocomplete-worker.patch
Review of attachment 8678331 [details] [diff] [review]:
-----------------------------------------------------------------
(In reply to Brian Grinstead [:bgrins] from comment #2)
> Created attachment 8678331 [details] [diff] [review]
> console-autocomplete-worker.patch
>
> Summary of changes:
Thanks, this helped with the review a lot!
Attachment #8678331 -
Flags: review?(nfitzgerald) → review+
Updated•9 years ago
|
Attachment #8678335 -
Flags: review?(nfitzgerald) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/15acf2adefd0
https://hg.mozilla.org/mozilla-central/rev/5b9e910d10b3
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Comment 8•9 years ago
|
||
Had to back this out from aurora since it was causing a super frequent to perma fail like https://treeherder.mozilla.org/logviewer.html#?job_id=1424858&repo=mozilla-aurora
Flags: needinfo?(nfitzgerald)
Flags: needinfo?(bgrinstead)
Updated•9 years ago
|
Flags: needinfo?(nfitzgerald)
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Carsten Book [:Tomcat] from comment #8)
> Had to back this out from aurora since it was causing a super frequent to
> perma fail like
> https://treeherder.mozilla.org/logviewer.html#?job_id=1424858&repo=mozilla-
> aurora
I've been looking into this, and it's a mystery why this only happens on Aurora builds. Getting around 30% failure at: https://treeherder.mozilla.org/#/jobs?repo=try&revision=998571acb4b5. Leaving ni? flag open
Assignee | ||
Comment 10•9 years ago
|
||
I have an aurora simulation on the latest m-c and with a bunch of retriggers I'm not seeing this error anymore: https://treeherder.mozilla.org/#/jobs?repo=try&revision=5361bf67b9a2&selectedJob=14429923. So hopefully we won't see this again when the merge happens.
Flags: needinfo?(bgrinstead)
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•