Skip to content

Commit

Permalink
support for contextual exec and disp
Browse files Browse the repository at this point in the history
  • Loading branch information
mayhemer committed Aug 11, 2020
1 parent cf59660 commit ffaf000
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions logan-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ logan.schema("MOZ_LOG",
}); // nsThreadPool

schema.module("events", module => {
module.rule("DISP %p", function(e) {
const dispatch = function(e) {
// createOnce: an event can be re-dispatched from within itself or multiple times.
this.obj(e).createOnce("Event", e => {
e.__dispatch_count = 0;
Expand All @@ -1699,7 +1699,10 @@ logan.schema("MOZ_LOG",
++e.__dispatch_count;
}
}).follow("TIMEOUT %u", e => { e.capture() });
});
};
module.rule("DISP %p", dispatch);
module.rule("DISP %p (%p)", function(e, c) { dispatch.call(this, e + ':' + c); });

module.rule("SEND %p %d %d", function(m, seqn, other_pid) {
this.obj(m).create("IPC Send").ipcid(seqn).send(`IPC:${other_pid}`).call(m => {
m.__ts = this.timestamp;
Expand All @@ -1720,6 +1723,7 @@ logan.schema("MOZ_LOG",
module.rule("EXEC %p", execute);
module.rule("EXEC %p [%*]", function(e, _) { execute.call(this, e, null); });
module.rule("EXEC %p %p", execute);
module.rule("EXEC %p (%p) %p", function(e, c, raii) { execute.call(this, e + ':' + c, raii); });
module.rule("EXEC %p %p [%*]", execute);

const receive = function(m, raii, seqn) {
Expand Down

0 comments on commit ffaf000

Please sign in to comment.