Closed Bug 1164483 Opened 10 years ago Closed 10 years ago

Move worker helpers from browser/devtools/shared to toolkit

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: jlong, Assigned: jlong)

References

Details

Attachments

(1 file, 2 obsolete files)

Jordan make some helper functions for spawning tasks in a web worker and waiting on the result. There are several places we can use this in the debugger backend so lets move it to toolkit so both sides can use it.
Assignee: nobody → jlong
Blocks: 1163798
Status: NEW → ASSIGNED
Attached patch 1164483.patch (obsolete) — Splinter Review
Moves it into the toolkit/devtools/shared folder which doesn't seem to be used a whole lot, but we should probably start putting stuff in there instead of just toolkit/devtools because that's getting quite cluttered.
Attachment #8605332 - Flags: review?(jsantell)
Attached patch 1164483.patch (obsolete) — Splinter Review
fixed a path issue
Attachment #8605332 - Attachment is obsolete: true
Attachment #8605332 - Flags: review?(jsantell)
Attachment #8605341 - Flags: review?(jsantell)
Comment on attachment 8605341 [details] [diff] [review] 1164483.patch Review of attachment 8605341 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, some paths in the comments need to be updated and vestigial files, and the main worker files and tests files should be moved via `hg move`, rather than delete/new files to preserve/cleaner history. Other than those things, r+! ::: browser/devtools/shared/widgets/GraphsWorker.js @@ +3,5 @@ > * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ > "use strict"; > > /** > * Import `createTask` to communicate with `devtools/shared/worker`. update path ::: toolkit/devtools/shared/tests/browser/xpcshell.ini @@ +1,2 @@ > +[DEFAULT] > +tags = devtools Is this file being used? Looks like leftover from an attempt to make the tests xpcshell tests ::: toolkit/devtools/shared/worker-helper.js @@ +5,5 @@ > + > +/** > + * This file is to only be included by ChromeWorkers. This exposes > + * a `createTask` function to workers to register tasks for communication > + * back to `devtools/shared/worker`. Update path ::: toolkit/devtools/shared/worker.js @@ +22,5 @@ > + > +/** > + * Creates a wrapper around a ChromeWorker, providing easy > + * communication to offload demanding tasks. The corresponding URL > + * must implement the interface provided by `devtools/shared/worker-helper`. update path @@ +80,5 @@ > + > +/** > + * Takes a function and returns a Worker-wrapped version of the same function. > + * Returns a promise upon resolution. > + * @see `./browser/devtools/shared/test/browser_devtools-worker-03.js update path
Attachment #8605341 - Flags: review?(jsantell) → review+
Attached patch 1164483.patchSplinter Review
comments addressed
Attachment #8605341 - Attachment is obsolete: true
Blocks: 1164632
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: