Closed Bug 1234179 Opened 9 years ago Closed 8 years ago

"ASSERTION: Deprecated, use NewChannelFromURI2 providing loadInfo arguments" in all Inspector / Markup View tests

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: sjakthol, Assigned: sjakthol)

Details

Attachments

(1 file)

The assertion is triggered by the test-actor-registry.js script [1] which calls NetUtil.asyncFetch() in a deprecated way [2] by giving the URL as string. The correct way to do it is to pass in an object that contains the URL and a loading principal [3].

Here's an example log showing the assertions: https://treeherder.mozilla.org/logviewer.html#?job_id=18818803&repo=mozilla-inbound#L3774

[1] https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/test/test-actor-registry.js
[2] https://dxr.mozilla.org/mozilla-central/rev/388bdc46ba51ee31da8b8abe977e0ca38d117434/netwerk/base/NetUtil.jsm#87
[3] https://dxr.mozilla.org/mozilla-central/rev/388bdc46ba51ee31da8b8abe977e0ca38d117434/netwerk/base/NetUtil.jsm#200
Try run for the patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=361a327ce97b

dt1 seems to be a perma-orange in mozilla-inboud too so I don't think it's my fault.
Comment on attachment 8700575 [details]
MozReview Request: Bug 1234179 - Use DTU.fetch() to load test-actor source in Markup View and Inspector tests. r?ochameau

https://reviewboard.mozilla.org/r/28763/#review25535

I'm confused as fetch also uses NetUtil.asyncFetch?
But reusing code is a good idea...
Attachment #8700575 - Flags: review?(poirot.alex) → review+
https://reviewboard.mozilla.org/r/28763/#review25535

The difference between DTU.fetch() and request() is that fetch() calls asyncFetch() with a Channel that has been correctly setup to use the system principal but request() calls it with an URL string (which is deprecated and now asserts in debug builds).
Assignee: nobody → sjakthol
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1ca987300351
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
[bugday-20160323]

Status: RESOLVED,FIXED -> UNVERIFIED

Comments:
STR: Not clear.
Developer specific testing

Component: 
Name			Firefox
Version			46.0b9
Build ID		20160322075646
Update Channel	beta
User Agent		Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
OS				Windows 7 SP1 x86_64

Expected Results: 
Developer specific testing

Actual Results: 
As expected
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: