diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index fb9fe06793d3..1c585861b132 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -3146,7 +3146,7 @@ ReadSourceFromFilename(JSContext* cx, const char* filename, char16_t** src, size rv = NS_NewChannel(getter_AddRefs(scriptChannel), uri, nsContentUtils::GetSystemPrincipal(), - nsILoadInfo::SEC_NORMAL, + nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL, nsIContentPolicy::TYPE_OTHER); NS_ENSURE_SUCCESS(rv, rv); @@ -3165,7 +3165,7 @@ ReadSourceFromFilename(JSContext* cx, const char* filename, char16_t** src, size scriptChannel->SetContentType(NS_LITERAL_CSTRING("text/plain")); nsCOMPtr scriptStream; - rv = scriptChannel->Open(getter_AddRefs(scriptStream)); + rv = scriptChannel->Open2(getter_AddRefs(scriptStream)); NS_ENSURE_SUCCESS(rv, rv); uint64_t rawLen;