Closed Bug 1307905 Opened 3 years ago Closed 3 years ago

Ignore irrelevant properties in stub generation

Categories

(DevTools :: Console, enhancement, P2)

enhancement

Tracking

(firefox52 fixed)

RESOLVED FIXED
Firefox 52
Tracking Status
firefox52 --- fixed

People

(Reporter: linclark, Assigned: nchevobbe)

References

Details

(Whiteboard: new-console)

Attachments

(1 file, 1 obsolete file)

Originally posted by:linclark

see https://github.com/devtools-html/gecko-dev/issues/257

When stubs are generated, the packet stubs will always have a different timestamp. For properties like these, we should make sure the incoming packet has the expected structure and then overwrite it with the existing stub's value so they don't have to change with each PR that adds a stub.

- [ ] timestamp
- [ ] actor ID
Priority: -- → P2
Whiteboard: new-console
Assignee: nobody → chevobbe.nicolas
Blocks: 1313688
Attached patch bug_1307905.patch (obsolete) — Splinter Review
Lin, I got this working a first time, by going manually through the different properties and type of packets, but I thought it was not ideal.
So I changed things in order to declare the irrelevant properties in a selector-like format.
I'm not a hundred percent convinced by this over the first method I did, so I wonder what you think of this.
Attachment #8805623 - Flags: feedback?(lclark)
This generalized code seems kind of complex. I'm not sure what the more manual approach would look like, but I'm guessing it might be clearer. I'd probably lean towards the manual approach since we probably won't have to make too many additions, but I leave it up to your judgement.
> This generalized code seems kind of complex. I'm not sure what the more manual approach would look like, but I'm guessing it might be clearer. I'd probably lean towards the manual approach since we probably won't have to make too many additions, but I leave it up to your judgement.

I agree with you. I revert back to the manual approach
Attachment #8805623 - Flags: feedback?(lclark)
Attachment #8805623 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Comment on attachment 8805919 [details]
Bug 1307905 - Ignore irrelevant properties in stub generation;

https://reviewboard.mozilla.org/r/89530/#review91230

I haven't tested it, but this looks good to me. The only thing I'd suggest is adding a comment before each block to describe what's getting cleaned. Thanks!
Attachment #8805919 - Flags: review?(lclark) → review+
Thanks for the review Lin ! I wanted bgrins to take it but he's not accepting review (probably hasn't switch back on when he came back), and I didn't saw him on IRC since Friday to tell him :)
Pushed by chevobbe.nicolas@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/342db7014f26
Ignore irrelevant properties in stub generation; r=linclark
https://hg.mozilla.org/mozilla-central/rev/342db7014f26
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.