Bug 1377355 - Unable to load unpacked web extensions in about:debugging; content script cannot be loaded; r=jimm

Remove the system principal check for unpacked (development) moz-extension loads
and rely on the existing host, scheme, and filesystem checks.

MozReview-Commit-ID: 7aI6dJsRJtP

--HG--
extra : rebase_source : 545de6efa0efb3935a22dd6e5375f0b6fe0d3d57
This commit is contained in:
Haik Aftandilian 2017-06-30 12:36:00 -07:00
Родитель 1b62eae6c7
Коммит b9fe95e890
1 изменённых файлов: 0 добавлений и 7 удалений

Просмотреть файл

@ -19,7 +19,6 @@
#include "FileDescriptor.h"
#include "FileDescriptorFile.h"
#include "LoadInfo.h"
#include "nsContentUtils.h"
#include "nsServiceManagerUtils.h"
#include "nsIFile.h"
#include "nsIFileChannel.h"
@ -558,12 +557,6 @@ ExtensionProtocolHandler::NewStream(nsIURI* aChildURI,
* channel is a file channel.
*/
nsCOMPtr<nsIPrincipal> childPrincipal;
NS_TRY(aChildLoadInfo->GetLoadingPrincipal(getter_AddRefs(childPrincipal)));
if (nsContentUtils::IsSystemPrincipal(childPrincipal)) {
return Err(NS_ERROR_FILE_ACCESS_DENIED);
}
nsCOMPtr<nsIChannel> channel;
NS_TRY(NS_NewChannelInternal(getter_AddRefs(channel),
aChildURI,