Bug 533038 - 5. Support loading jar uris in the js subscript loader, r=bsmedberg a=blocking-beta6

This commit is contained in:
Michael Wu 2010-09-08 20:39:00 -07:00
parent ccd55337cc
commit 2be2e1f425

View File

@ -281,7 +281,8 @@ mozJSSubScriptLoader::LoadSubScript (const PRUnichar * aURL
if (!scheme.EqualsLiteral("chrome"))
{
// This might be a URI to a local file, though!
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(uri);
nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(uri);
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(innerURI);
if (!fileURL)
{
errmsg = JS_NewStringCopyZ (cx, LOAD_ERROR_URI_NOT_LOCAL);