Closed Bug 1297370 Opened 5 years ago Closed 5 years ago
An error occurs when importing canvas snapshot
. Net Util .jsm: async Fetch() requires the channel to have one of the security flags set in the loadinfo (see ns ILoad Info)
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 Build ID: 20160822064441 Steps to reproduce: 1. Start Nightly 2. Go to "http://helloracer.com/webgl/" 3. Open DevTools > Canvas 4. Click Reload and Recording 5. Save snapshot in local 6. Import the snapshot 7. Check error in Browser Console Actual results: An error occurs when importing canvas snapshot. NetUtil.jsm: asyncFetch() requires the channel to have one of the security flags set in the loadinfo (see nsILoadInfo). Please create channel using NetUtil.newChannel() NetUtil.jsm:158 NetUtil_asyncFetch resource://gre/modules/NetUtil.jsm:158:17 SnapshotsListView<._onImportButtonClick chrome://devtools/content/canvasdebugger/snapshotslist.js:370:5 bound self-hosted oncommand chrome://devtools/content/canvasdebugger/canvasdebugger.xul:1:1 Regression range: https://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=f7d385fac19af534b7c1e8b199e1c5eb4f3034c4&tochange=95d1ed3bea77c89f9637396f5e7a53955c013a42 Expected results: Import works without error
Christoph, what's going wrong here?
Assignee: nobody → ckerschb
Status: NEW → ASSIGNED
Priority: -- → P1
It's missing one of the securityFlags needed to call asyncOpen2() on it. In fact we should use |loadUsingSystemPrincipal = true| for that load, similar to the other callsite within browser/devtools. See  which is the other callsite within browser/devtools which we converted at the same time within the same bug. That conversion btw landed in FF41, so this feature has been broken for a long time. I suppose we should uplift to all channels?  https://hg.mozilla.org/mozilla-central/rev/eccbddbe4761#l3.19
Attachment #8783965 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8783965 [details] [diff] [review] bug_1297370_update_snapshot.patch (In reply to Christoph Kerschbaumer [:ckerschb] from comment #2) > That conversion btw landed in FF41, so this feature has been > broken for a long time. I suppose we should uplift to all channels? I mean, not sure it meets ESR criteria, or ones for release. But definitely aurora+beta. Rest is up to you.
Attachment #8783965 - Flags: review?(gijskruitbosch+bugs) → review+
Comment on attachment 8783965 [details] [diff] [review] bug_1297370_update_snapshot.patch Approval Request Comment Importing *.json into the canvas debugger fails without this patch. The Bug that regressed that landed in FF41, so this feature has been broken for quite some time. [Feature/regressing bug #]: Bug 1167053 - Convert NetUtil.newChannel2 callsites to use new API - update newChannel2 [User impact if declined]: See approval request. [Describe test coverage new/current, TreeHerder]: Tested manually using the description in comment 0. [Risks and why]: Low, because it only provides the necessary default when loading a local file into the debugger. [String/UUID change made/needed]: no
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/dab0693cae68 Provide security flag for channel within snapshotlist. r=gijs
Wes, just want to make sure this lands today in m-c so I will have time to uplift to beta for tomorrow.
Comment on attachment 8783965 [details] [diff] [review] bug_1297370_update_snapshot.patch We want developers to be able to import json, let's uplift to beta. Verified in nightly and the risk seems limited to this feature.
I have reproduced this bug with Nightly 51.0a1 (2016-08-23) on Windows 8.1 (64 Bit!). This bug's fix is verified on Latest Beta 49.0b8 and Latest Aurora 50.0a2. Latest Beta 49.0b8 : Build ID : 20160829102229 User Agent : Mozilla/5.0 (Windows NT 6.3; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 Latest Aurora 50.0a2 : Build ID : 20160901004001 User Agent : Mozilla/5.0 (Windows NT 6.3; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 [bugday-20160831]
You need to log in before you can comment on or make changes to this bug.