Bug 1411480 - Make CallbackNode::mDomain const. r=glandium.

MozReview-Commit-ID: EvLC5FrMyKy

--HG--
extra : rebase_source : d5998326dd40365903554094b9038248095020dc
This commit is contained in:
Nicholas Nethercote 2017-10-26 12:29:41 +11:00
parent 9222ab2401
commit 14790e76d7

View File

@ -291,7 +291,7 @@ MatchPrefEntry(const PLDHashEntryHdr* aEntry, const void* aKey)
struct CallbackNode
{
char* mDomain;
const char* mDomain;
// If someone attempts to remove the node from the callback list while
// pref_DoCallback is running, |func| is set to nullptr. Such nodes will
@ -381,7 +381,7 @@ PREF_Cleanup()
while (node) {
next_node = node->mNext;
free(node->mDomain);
free(const_cast<char*>(node->mDomain));
free(node);
node = next_node;
}
@ -1194,7 +1194,7 @@ pref_RemoveCallbackNode(CallbackNode* aNode, CallbackNode* aPrevNode)
if (gLastPriorityNode == aNode) {
gLastPriorityNode = aPrevNode;
}
free(aNode->mDomain);
free(const_cast<char*>(aNode->mDomain));
free(aNode);
return next_node;
}