Skip to content

Commit

Permalink
Bug 1390428 (part 6) - Remove nsXPIDLCString class members. r=erahm.
Browse files Browse the repository at this point in the history
These are all straightforward except for InternalLoadEvent::mTypeHint, which
requires a bit of care to preserve existing behaviour.

--HG--
extra : rebase_source : 9b152122b011cf49b9acccdc98b4693548b8bdd2
  • Loading branch information
nnethercote committed Aug 17, 2017
1 parent a33f11e commit 9160e1c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
9 changes: 6 additions & 3 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9711,6 +9711,8 @@ class InternalLoadEvent : public Runnable
// Make sure to keep null things null as needed
if (aTypeHint) {
mTypeHint = aTypeHint;
} else {
mTypeHint.SetIsVoid(true);
}
}

Expand All @@ -9722,16 +9724,17 @@ class InternalLoadEvent : public Runnable
mReferrer,
mReferrerPolicy,
mTriggeringPrincipal, mPrincipalToInherit,
mFlags, EmptyString(), mTypeHint.get(),
mFlags, EmptyString(),
mTypeHint.IsVoid() ? nullptr
: mTypeHint.get(),
NullString(), mPostData, mHeadersData,
mLoadType, mSHEntry, mFirstParty,
mSrcdoc, mSourceDocShell, mBaseURI,
mCheckForPrerender, nullptr, nullptr);
}

private:
// Use IDL strings so .get() returns null by default
nsXPIDLCString mTypeHint;
nsCString mTypeHint;
nsString mSrcdoc;

RefPtr<nsDocShell> mDocShell;
Expand Down
2 changes: 0 additions & 2 deletions dom/plugins/base/nsNPAPIPluginInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ class nsNPAPIPluginInstance final : public nsIAudioChannelAgentCallback
// True while creating the plugin, or calling NPP_SetWindow() on it.
bool mInPluginInitCall;

nsXPIDLCString mFakeURL;

private:
RefPtr<nsNPAPIPlugin> mPlugin;

Expand Down
4 changes: 2 additions & 2 deletions netwerk/streamconv/converters/nsDirIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class nsDirIndex final : public nsIDirIndex {

protected:
uint32_t mType;
nsXPIDLCString mContentType;
nsXPIDLCString mLocation;
nsCString mContentType;
nsCString mLocation;
nsString mDescription;
int64_t mSize;
PRTime mLastModified;
Expand Down
2 changes: 1 addition & 1 deletion rdf/base/nsRDFXMLSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class nsRDFXMLSerializer : public nsIRDFXMLSerializer,

nsCOMPtr<nsIRDFDataSource> mDataSource;
nsNameSpaceMap mNameSpaces;
nsXPIDLCString mBaseURLSpec;
nsCString mBaseURLSpec;

// hash mapping resources to utf8-encoded QNames
nsDataHashtable<nsISupportsHashKey, nsCString> mQNames;
Expand Down

0 comments on commit 9160e1c

Please sign in to comment.