mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 863246 - Use system principal to load debugger scripts r=billm,bkelly
MozReview-Commit-ID: DPvbR1As2UV --HG-- extra : rebase_source : 7fbaf2a4d15884393d07cd80a37093cc32dfd0a2
This commit is contained in:
parent
bb279d6d5e
commit
8dfbf147fb
@ -894,10 +894,19 @@ private:
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
MOZ_ASSERT(aIndex < mLoadInfos.Length());
|
||||
MOZ_ASSERT_IF(IsMainWorkerScript(), mWorkerScriptType != DebuggerScript);
|
||||
|
||||
WorkerPrivate* parentWorker = mWorkerPrivate->GetParent();
|
||||
|
||||
nsIPrincipal* principal = mWorkerPrivate->GetPrincipal();
|
||||
// For JavaScript debugging, the devtools server must run on the same
|
||||
// thread as the debuggee, indicating the worker uses content principal.
|
||||
// However, in Bug 863246, web content will no longer be able to load
|
||||
// resource:// URIs by default, so we need system principal to load
|
||||
// debugger scripts.
|
||||
nsIPrincipal* principal = (mWorkerScriptType == DebuggerScript) ?
|
||||
nsContentUtils::GetSystemPrincipal() :
|
||||
mWorkerPrivate->GetPrincipal();
|
||||
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = mWorkerPrivate->GetLoadGroup();
|
||||
MOZ_DIAGNOSTIC_ASSERT(principal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user