Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID()
Categories
(Core :: DOM: Web Crypto, task, P3)
Tracking
()
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(3 files)
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.
Assignee | ||
Comment 1•3 years ago
|
||
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.
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Pushed by cpeterson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1778ca2ab291 Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika
Comment 4•3 years ago
|
||
Backed out for bc failures on browser_xpcom_graph_wait.js.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=360478518&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/f7989bcb9c41edef489f906243e57a967e81fba5
[task 2021-12-08T04:42:54.772Z] 04:42:54 INFO - TEST-PASS | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: should have no unexpected services loaded - [] deepEqual [] -
[task 2021-12-08T04:42:54.773Z] 04:42:54 INFO - Buffered messages finished
[task 2021-12-08T04:42:54.774Z] 04:42:54 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: all services allowlist entries should have been used - 1 deepEqual 0 - JS frame :: chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js :: test_xpcom_graph_wait :: line 418
[task 2021-12-08T04:42:54.774Z] 04:42:54 INFO - Stack trace:
[task 2021-12-08T04:42:54.775Z] 04:42:54 INFO - chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js:test_xpcom_graph_wait:418
[task 2021-12-08T04:42:54.776Z] 04:42:54 INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-12-08T04:42:54.777Z] 04:42:54 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: unused services allowlist entry: {706d36bb-bf79-4293-81f2-8f6828c18f9d} (CID with human-readable contract ID @mozilla.org/uuid-generator;1) -
[task 2021-12-08T04:42:54.777Z] 04:42:54 INFO - Stack trace:
[task 2021-12-08T04:42:54.778Z] 04:42:54 INFO - chrome://mochikit/content/browser-test.js:test_ok:1336
[task 2021-12-08T04:42:54.778Z] 04:42:54 INFO - chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js:test_xpcom_graph_wait:426
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
I'm investigating this test failure. The problem is related to the uuid-generator service no longer being needed for some tests.
Comment 6•3 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:cpeterson, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 7•3 years ago
•
|
||
(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #6)
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:cpeterson, could you have a look please?
I'm investigating the test failure.
The browser_xpcom_graph_wait.js test launches a background task process and waits 10 seconds to see which JSMs and services are loaded. Looks like a timing issue with the Linux ASan build is causing the nsUUIDGenerator service to get loaded but not used, even if I increase the test duration from 10 seconds to 60 seconds.
test-linux1804-64-asan-qr/opt-mochitest-browser-chrome-swr-e10s-10
TEST-UNEXPECTED-FAIL | toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js | AfterRunBackgroundTaskNamed: all services allowlist entries should have been used - 1 deepEqual 0 - JS frame :: chrome://mochitests/content/browser/toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js :: test_xpcom_graph_wait :: line 418
Assignee | ||
Comment 8•3 years ago
|
||
This change is needed to avoid toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js test failures where the nsUUIDGenerator service was loaded during ASan test runs but not non-ASan test runs (due to differences in temp profile directory paths).
Using nsID::GenerateUUIDInPlace() also avoids the overhead of instantiating the nsUUIDGenerator service.
Depends on D132866
Assignee | ||
Comment 9•3 years ago
|
||
This change is needed to avoid toolkit/components/backgroundtasks/tests/browser/browser_xpcom_graph_wait.js test failures where the nsUUIDGenerator service was loaded during ASan test runs but not non-ASan test runs (due to differences in temp profile directory paths). With this change, the nsUUIDGenerator service is no longer needed in BackgroundTasks.
Using nsID::GenerateUUIDInPlace() also avoids the overhead of instantiating the nsUUIDGenerator service.
Depends on D136992
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Pushed by cpeterson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d94dfc7a3536 Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika https://hg.mozilla.org/integration/autoland/rev/dbe15c60505d widget/windows: Use nsID::GenerateUUIDInPlace() instead of the nsUUIDGenerator service. r=tkikuchi https://hg.mozilla.org/integration/autoland/rev/d95b4d9c7ef3 xre: Use nsID::GeneratorUUIDInPlace() instead of the nsUUIDGenerator service. r=mossop
Comment 11•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d94dfc7a3536
https://hg.mozilla.org/mozilla-central/rev/dbe15c60505d
https://hg.mozilla.org/mozilla-central/rev/d95b4d9c7ef3
Updated•3 years ago
|
Description
•