diff --git a/dom/indexedDB/test/file.js b/dom/indexedDB/test/file.js index f6ed4e451bca..435edc1052bf 100644 --- a/dom/indexedDB/test/file.js +++ b/dom/indexedDB/test/file.js @@ -253,7 +253,7 @@ function grabFileUsageAndContinueHandler(request) { function getCurrentUsage(usageHandler) { let qms = SpecialPowers.Services.qms; - let principal = SpecialPowers.wrap(document).nodePrincipal; + let principal = SpecialPowers.wrap(document).effectiveStoragePrincipal; let cb = SpecialPowers.wrapCallback(usageHandler); qms.getUsageForPrincipal(principal, cb); } diff --git a/dom/indexedDB/test/test_sandbox.html b/dom/indexedDB/test/test_sandbox.html index 0a15a5328786..61b64596cbf2 100644 --- a/dom/indexedDB/test/test_sandbox.html +++ b/dom/indexedDB/test/test_sandbox.html @@ -81,7 +81,7 @@ function runInSandbox(sandbox, testFunc) { } // Use the window principal for the sandbox; location.origin is not sufficient. -var sb = new SpecialPowers.Cu.Sandbox(window, +var sb = new SpecialPowers.Cu.Sandbox(SpecialPowers.wrap(window.document).effectiveStoragePrincipal, { wantGlobalProperties: ["indexedDB"] }); sb.ok = SpecialPowers.Cu.exportFunction(ok, sb); diff --git a/dom/quota/PrincipalUtils.cpp b/dom/quota/PrincipalUtils.cpp index b773c9c90ae4..291c175b4f7f 100644 --- a/dom/quota/PrincipalUtils.cpp +++ b/dom/quota/PrincipalUtils.cpp @@ -272,7 +272,7 @@ Result GetInfoFromWindow( nsCOMPtr sop = do_QueryInterface(aWindow); QM_TRY(OkIf(sop), Err(NS_ERROR_FAILURE)); - nsCOMPtr principal = sop->GetPrincipal(); + nsCOMPtr principal = sop->GetEffectiveStoragePrincipal(); QM_TRY(OkIf(principal), Err(NS_ERROR_FAILURE)); return GetInfoFromPrincipal(principal); @@ -311,7 +311,7 @@ Result GetOriginFromWindow( nsCOMPtr sop = do_QueryInterface(aWindow); QM_TRY(OkIf(sop), Err(NS_ERROR_FAILURE)); - nsCOMPtr principal = sop->GetPrincipal(); + nsCOMPtr principal = sop->GetEffectiveStoragePrincipal(); QM_TRY(OkIf(principal), Err(NS_ERROR_FAILURE)); QM_TRY_RETURN(GetOriginFromPrincipal(principal));