Bug 1744425 - Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika

Bug 1723674 added a new nsID::GenerateUUID() static factory function to generate UUIDs without the overhead of querying and instantiating an nsIUUIDGenerator object. nsContentUtils::GenerateUUID() is a utility function that amortizes that overhead by holding an nsIUUIDGenerator singleton. That's no longer necessary because code that calls nsContentUtils::GenerateUUID() can now just call nsID::GenerateUUID(). No nsIUUDGenerator is needed.

Differential Revision: https://phabricator.services.mozilla.com/D132866
This commit is contained in:
Chris Peterson
2021-12-08 03:19:11 +00:00
parent 5b567c010b
commit 6e3e9adfcc
23 changed files with 31 additions and 88 deletions

View File

@@ -408,7 +408,7 @@ void nsHtml5StreamParser::SetViewSourceTitle(nsIURI* aURL) {
mURIToSendToDevtools = aURL;
nsID uuid;
nsresult rv = nsContentUtils::GenerateUUIDInPlace(uuid);
nsresult rv = nsID::GenerateUUIDInPlace(uuid);
if (!NS_FAILED(rv)) {
char buffer[NSID_LENGTH];
uuid.ToProvidedString(buffer);