mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 1411480 - Make CallbackNode::mDomain const. r=glandium.
MozReview-Commit-ID: EvLC5FrMyKy --HG-- extra : rebase_source : d5998326dd40365903554094b9038248095020dc
This commit is contained in:
parent
9222ab2401
commit
14790e76d7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user