-
Notifications
You must be signed in to change notification settings - Fork 759
Use source map service from toolbox in Firefox #2506
Use source map service from toolbox in Firefox #2506
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2506 +/- ##
==========================================
- Coverage 55.58% 54.99% -0.59%
==========================================
Files 39 39
Lines 1801 1813 +12
Branches 379 376 -3
==========================================
- Hits 1001 997 -4
- Misses 800 816 +16
Continue to review full report at Codecov.
|
stopSourceMapWorker(); | ||
stopPrettyPrintWorker(); | ||
stopParserWorker(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the rationale for moving this to bootstrap? I was thinking of doing the same thing, just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was helpful to see both bootstrap and teardown in the same file. For example with this change, we need to use the same Firefox conditional for the source map worker. With it all in one file, it's easy to see they work the same way.
@@ -1,11 +1,12 @@ | |||
// @flow | |||
|
|||
/** | |||
* Utils for mochitest | |||
* Utils for Jest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
0d891b5
to
adbf644
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Lets wait for the mochitest fix to land to make sure this doesn't break anything else
src/actions/navigation.js
Outdated
clearSourceMaps(); | ||
clearDocuments(); | ||
return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) { | ||
sourceMaps.clearSourceMaps(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this use await
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, probably so since it goes through the worker messaging. I'll update it.
let { frames, why, loadedObjects } = pauseInfo; | ||
frames = await updateFrameLocations(frames); | ||
frames = await updateFrameLocations(frames, sourceMaps); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
src/client/index.js
Outdated
|
||
bootstrapWorker(); | ||
bootstrapWorkers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
menuOptions.push(jumpLabel); | ||
} | ||
// TODO: Find a new way to only add this for mapped sources? | ||
menuOptions.push(jumpLabel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah - this will be tough, the way we're doing it now. But that is okay. This will just be a no-op in the context menu.
bootstrap(React, ReactDOM).then(onConnect); | ||
window.L10N = L10N; | ||
// $FlowIgnore: | ||
window.L10N.setBundle(require("../assets/panel/debugger.properties")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
export function teardownWorkers() { | ||
if (!isFirefoxPanel()) { | ||
// When used in Firefox, the toolbox manages the source map worker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
adbf644
to
dbc87db
Compare
Summary of Changes
sourceMapService
object from the toolbox, which manages the worker itself, etc. Those details are hidden from the debugger.Test Plan