<div dir="ltr"><div><div><div><div><div><div><div>Hi all!<br><br></div>   I've implemented a custom protocol via nsIProtocolHandler in my add-on, and part of its function is to load local resources (for example, default web pages).   I do this by having my nsIChannel proxy out a page load to the 'resource' protocol handler (some aspects must be injected into the page, so I cannot simply pass it along).<br><br></div>   Everything is working great, except for the fact that loads to the @font-face URL (a local .woff file accessible by resource://<path>) mysteriously fails.  Here's what I'm seeing in the console:<br><br>downloadable font: download failed (font-family: "Questrial" style:normal weight:normal stretch:normal src index:0): status=2147500037<br>source: <myscheme>://css/font/Questrial/Questrial-Regular.woff<br><br></div>Here are some additional facts:<br><br></div> 1) The woff file is loadable as a file by typing in the resource URL above, firefox offers to save the file for me.<br></div> 2) The woff file is in the same directory as the .css stylesheet which is loading, applied to the HTML properly, and in fact is where the @font-face link is.<br></div> 3) The newURI() method of my nsIProtocolHandler is getting called with the correct URI spec  ("Questrial/Questrial-Regular.woff") and baseURI (<myscheme>://css/main.css) and the newURI() method is correctly resolving the absolute URL (<myscheme>://css/Questrial/Questrial-Regular.woff")  - this is then being set as channel.originalURI.  The actual resource URI is also being computed correctly ("resource://myscheme/webdir/css/Questrial/Questrial-Regular.woff") - this last URL is the one that can be loaded via the location bar, and it is set in channel.URI.<br></div><div> 4) The newChannel() method of my nsProtocolHandler is being called, and returns a new channel just the same way it does for the original HTML page load or the similarly relative-referenced (from a <link> in the head of the HTML) CSS file.<br></div><div> 5) the new channel's asyncOpen() is never called, but that above error appears in the console.<br><br></div><div>   Any ideas?   I've been looking at   layout/style/nsFontFaceLoader.cpp for clues, but I can't really understand what's going on in there, or exactly what component is failing with that error.   I'd like to not have to build a debug version of FF and step through it, so if anyone has input it would be greatly appreciated!<br><br></div><div>   Thanks,<br></div><div>    -David<br></div></div>