mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
ce3914c897
The meaning of resource:///, resource://app/ and resource://gre/ needs to remain constant. Unfortunately, the model of the resource protocol handler is that it is possible to set substitutions that change their meaning. So, we forbid setting overwriting the substitutions for those three special "host names". Unfortunately, with e10s, the full list of substitutions is also sent to the content process, which then sets substitutions, making it harder to know in which cases SetSubstitution is valid for those three "host names" or not. So instead of trying to find the right heuristics, use the recently added SubstitutingProtocolHandler::ResolveSpecialCases API to handle the three "host names" instead of storing them as "normal" substitutions. Still actively reject SetSubstitution with the three special "host names" so as to find issues such as bug 1224000 instead of allowing the chrome manifest entry and have it silently ignored. Additionally, make GetSubstitution return the URIs for the three special "host names" through GetSubstitutionInternal, replacing what was originally added in bug 257162. Those changes from bug 257162 relied on the resource:app string being handled by nsXREDirProvider::GetFile, but that was removed in bug 620931, effectively making that code now in GetSubstitutionInternal useless. |
||
---|---|---|
.. | ||
ExtensionProtocolHandler.cpp | ||
ExtensionProtocolHandler.h | ||
moz.build | ||
nsIResProtocolHandler.idl | ||
nsISubstitutingProtocolHandler.idl | ||
nsResProtocolHandler.cpp | ||
nsResProtocolHandler.h | ||
SubstitutingProtocolHandler.cpp | ||
SubstitutingProtocolHandler.h |