Closed Bug 1227317 Opened 9 years ago Closed 5 years ago

Get rid of one of the `unsafeSynchronize` calls in `_addSource`

Categories

(DevTools :: Debugger, defect)

40 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jlong, Unassigned)

References

Details

I think we can avoid this one: https://dxr.mozilla.org/mozilla-central/source/devtools/server/actors/script.js#1935

I don't know why, but calling `unsafeSynchronize` in `_addSource` blows up the mulet b2g unit test runner, which runs gata unit tests while the devtools is open. In bug 1132501 we made the toolbox automatically attach a thread when it opens, so when the debugger is attached it doesn't work. Not calling `unsafeSynchronize` makes it work. There's a very strange interaction between creating the nested event loop and websockets; the websocket connection just aborts before the tests start running. See the aforementioned bug for many more details.

If the only reason we call that `unsafeSynchronize` is to make sure we resolve the right actor IDs, we should not be abusing actor IDs the way we are currently. I've been thinking of moving away from this anyway. We should probably just expose a neutral ID that the frontend uses to talk to the backend, that stays the same across reloads if it should, etc.
See Also: → 1132501
Product: Firefox → DevTools
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.