Closed
Bug 1447190
Opened 7 years ago
Closed 7 years ago
Remove internal mutability from nsStandardURL
Categories
(Core :: Networking, enhancement, P2)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: valentin, Assigned: valentin)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
nsStandardURL is mostly immutable at this point, at least externally.
But for it to be threadsafe, it needs to be internally immutable as well, meaning there needs to be no lazy initialization triggered by getters.
mSpecEncoding is one such example. It seems it can be removed completely, as the spec is always ASCII encoded.
mDisplayHost is another. This can be fixed by always updating mDisplayHost when changing the host.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8960586 [details]
Bug 1447190 - Remove internal mutability from nsStandardURL
https://reviewboard.mozilla.org/r/229332/#review235626
::: netwerk/base/nsStandardURL.cpp:216
(Diff revision 1)
> +
> +#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN
> + StaticMutexAutoLock lock(gAllURLsMutex);
> + if (isInList()) {
> + remove();
> + }
nit: please add the code in the #ifdef block to a { }, so that when someone adds something it's not locked when defined
Attachment #8960586 -
Flags: review?(honzab.moz) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5f6e0c390b40
Remove internal mutability from nsStandardURL r=mayhemer
Comment 6•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•