Closed Bug 1244921 Opened 8 years ago Closed 8 years ago

Script blocker in MessageChannel causes code to run at unexpected times

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1191145
Tracking Status
firefox47 --- affected

People

(Reporter: billm, Assigned: billm)

References

Details

Daniel found this issue when running NoScript. The bug is here:
https://dxr.mozilla.org/mozilla-central/source/ipc/glue/MessageChannel.cpp#1407

Here is the sequence of events:
- CPOW comes in from the parent.
- It gets dispatched and it causes a script to be enqueued with the script blocker at the line I referenced.
- In the script blocker destructor, we run that script.
- The script sends a normal priority sync message.
- This message is considered to be in the same transaction as the CPOW because AutoEnterTransaction is still on the stack from DispatchMessage.
- However, it doesn't cause the CPOW to be cancelled because mDispatchingSyncMessagePriority is 0, since the script runs outside of the AutoSetValue for that field.
This should be fixed by bug 1244921, assuming it sticks this time.
Looks like you're right. I can't reproduce the hang (bug 1239767) anymore (in a debug inbound build at least), so I've duped that bug to bug 1191145.

Should we dupe this bug as well? Or resolve it as FIXED/WFM with a dependency on bug 1191145?
Flags: needinfo?(wmccloskey)
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(wmccloskey)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.