Skip to content

Commit

Permalink
Set originalURI for greasemonkey-script: protocol channels.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ventero committed Nov 10, 2015
1 parent a4f8aed commit 690364b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/scriptProtocol.js
Expand Up @@ -146,7 +146,14 @@ var ScriptProtocol = {
// In parent scope we have the raw script, with file intact.
uri = GM_util.getUriFromFile(resource.file);
}
return GM_util.channelFromUri(uri);

// Get the channel for the file URI, but set its originalURI to the
// greasemonkey-script: protocol URI, to ensure it can still be loaded
// in unprivileged contexts (bug #2326).
var channel = GM_util.channelFromUri(uri);
channel.originalURI = aUri;

return channel;
}
}

Expand Down

0 comments on commit 690364b

Please sign in to comment.