Skip to content

Commit

Permalink
Merge pull request #3 from mbrodesser-Igalia/extend_rules_to_link_fro…
Browse files Browse the repository at this point in the history
…m_notifyobservers_to_nsHttpChannel

Extend rules to link from `nsHttpHandler::NotifyObservers` to the corresponding `nsHttpChannel`
  • Loading branch information
jesup authored Jan 1, 2024
2 parents 122e47a + 1e64a50 commit aa81a0a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions logan-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ logan.schema("MOZ_LOG",
});

module.rule("nsHttpHandler::NotifyObservers [this=%p chan=%p event=%s]", function(ptr, channelPtr, eventTopic) {
this.obj(ptr).capture();
this.obj(ptr).capture().link(channelPtr);
});

/******************************************************************************
Expand Down Expand Up @@ -587,7 +587,7 @@ logan.schema("MOZ_LOG",
* nsHttpChannel
******************************************************************************/

module.rule("Creating nsHttpChannel [this=%p]", function(ch) {
module.rule("Creating nsHttpChannel [this=%p, nsIChannel=%p]", function(ch, nsIChannelPtr) {
this.thread.on("httpbasechannel", httpbasechannel => {
ch = this.obj(ch).inherits(httpbasechannel, "nsHttpChannel").grep().expect("uri=%s", (ch, uri) => {
ch.prop("url", uri).capture();
Expand All @@ -605,9 +605,11 @@ logan.schema("MOZ_LOG",
this.thread.on("openingwebsocket", ws => {
ws.link(ch).prop("url", ch.props.url);
});
this.obj(nsIChannelPtr).create("nsIChannelPtr");
});
module.rule("Destroying nsHttpChannel [this=%p]", function(ptr) {
module.rule("Destroying nsHttpChannel [this=%p, nsIChannel=%p]", function(ptr, nsIChannelPtr) {
this.obj(ptr).destroy();
this.obj(nsIChannelPtr).destroy();
});
module.rule("nsHttpChannel::Init [this=%p]", function(ptr) {
this.thread.httpchannel_init = this.obj(ptr).capture();
Expand Down

0 comments on commit aa81a0a

Please sign in to comment.