mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 931887 - Use swap() instead forget() in LoadInfo, r=bent
This commit is contained in:
parent
64d78bdedb
commit
50bbfcb022
@ -159,13 +159,27 @@ public:
|
||||
void
|
||||
StealFrom(LoadInfo& aOther)
|
||||
{
|
||||
mBaseURI = aOther.mBaseURI.forget();
|
||||
mResolvedScriptURI = aOther.mResolvedScriptURI.forget();
|
||||
mPrincipal = aOther.mPrincipal.forget();
|
||||
mScriptContext = aOther.mScriptContext.forget();
|
||||
mWindow = aOther.mWindow.forget();
|
||||
mCSP = aOther.mCSP.forget();
|
||||
mChannel = aOther.mChannel.forget();
|
||||
MOZ_ASSERT(!mBaseURI);
|
||||
aOther.mBaseURI.swap(mBaseURI);
|
||||
|
||||
MOZ_ASSERT(!mResolvedScriptURI);
|
||||
aOther.mResolvedScriptURI.swap(mResolvedScriptURI);
|
||||
|
||||
MOZ_ASSERT(!mPrincipal);
|
||||
aOther.mPrincipal.swap(mPrincipal);
|
||||
|
||||
MOZ_ASSERT(!mScriptContext);
|
||||
aOther.mScriptContext.swap(mScriptContext);
|
||||
|
||||
MOZ_ASSERT(!mWindow);
|
||||
aOther.mWindow.swap(mWindow);
|
||||
|
||||
MOZ_ASSERT(!mCSP);
|
||||
aOther.mCSP.swap(mCSP);
|
||||
|
||||
MOZ_ASSERT(!mChannel);
|
||||
aOther.mChannel.swap(mChannel);
|
||||
|
||||
mDomain = aOther.mDomain;
|
||||
mEvalAllowed = aOther.mEvalAllowed;
|
||||
mReportCSPViolations = aOther.mReportCSPViolations;
|
||||
|
Loading…
x
Reference in New Issue
Block a user