Closed Bug 1308509 Opened 5 years ago Closed 5 years ago

Remove usage of Ci.nsIContentPolicy constants from frontend (dechrome)

Categories

(DevTools :: Netmonitor, defect, P1)

defect

Tracking

(firefox53 fixed)

RESOLVED FIXED
Firefox 53
Iteration:
53.5 - Jan 23
Tracking Status
firefox53 --- fixed

People

(Reporter: rickychien, Assigned: jsnajdr)

References

(Blocks 1 open bug)

Details

(Whiteboard: [netmonitor])

Attachments

(1 file)

The RDP protocol sends a “cause” field for every request, where the “type” is a numeric value of a Ci.nsIContentPolicy constant (e.g., TYPE_IMAGE). This was a design mistake. The RDP protocol should send strings (e.g., “image”). The frontend then doesn’t need access to Ci.nsIContentPolicy to figure out what the values mean.
Whiteboard: [devtools-html]
Whiteboard: [netmonitor]
Flags: qe-verify-
Priority: -- → P2
I moved the code that uses the chrome Ci.nsIContentPolicy constants to the backend. The RDP protocol now sends a string ("xhr") instead of a number as the value of cause.type.

For backward compatibility, I detect if cause.type is a string. If it isn't, I just display "unknown". Remote debugging is quite rare, so I think this is enough.
Assignee: nobody → jsnajdr
Status: NEW → ASSIGNED
Iteration: --- → 53.4 - Jan 9
Priority: P2 → P1
Comment on attachment 8824950 [details]
Bug 1308509 - Remove usage of Ci.nsIContentPolicy constants from Netmonitor frontend

https://reviewboard.mozilla.org/r/103290/#review103896

I can't apply the patch, can you please rebase.

Honza
Attachment #8824950 - Flags: review?(odvarko)
Comment on attachment 8824950 [details]
Bug 1308509 - Remove usage of Ci.nsIContentPolicy constants from Netmonitor frontend

https://reviewboard.mozilla.org/r/103290/#review103946

Looks good and works for me, thanks Jarda!

R+ assuming try is green

Honza
Attachment #8824950 - Flags: review?(odvarko) → review+
Iteration: 53.4 - Jan 9 → 53.5 - Jan 23
Pushed by jsnajdr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a0e58719ac8e
Remove usage of Ci.nsIContentPolicy constants from Netmonitor frontend r=Honza
https://hg.mozilla.org/mozilla-central/rev/a0e58719ac8e
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.