Implement nsBaseHashtable::GetOrInsertWith and nsBaseHashtable::GetOrInsert with a user-defined value
Categories
(Core :: XPCOM, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: sg, Assigned: sg)
References
Details
Attachments
(8 files, 2 obsolete files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1691894 - Always hold PrefCallback in a UniquePtr in nsPrefBranch::AddObserverImpl. r=KrisWright
48 bytes,
text/x-phabricator-request
|
Details | Review |
Currently, nsBaseHashtable::GetOrInsert
default-constructs a value, so in cases where a different value should be inserted or the DataType isn't default-constructible, the more verbose WithEntryHandle
must be used. Allowing to specify a user-defined value with nsBaseHashtable::GetOrInsert
resp. a factory with nsBaseHashtable::GetOrInsertWith
would allow to simplify code.
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Depends on D104672
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D104673
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D104674
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D104675
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D104676
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D104849
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D104850
Updated•3 years ago
|
Assignee | ||
Comment 10•3 years ago
|
||
Depends on D104851
Assignee | ||
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5213eb40bb50 Fix EntryHandle to only work with DataType rather than wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika,jonco,valentin https://hg.mozilla.org/integration/autoland/rev/72d7d50c86aa Replace use of GetOrInsert by WithEntryHandle. r=dom-worker-reviewers,janv
Comment 12•3 years ago
|
||
bugherder |
Comment 13•3 years ago
|
||
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/db4503476f34 Implement nsBaseHashtable::GetOrInsertWith and nsBaseHashtable::GetOrInsert with user-defined constructor arguments. r=xpcom-reviewers,nika https://hg.mozilla.org/integration/autoland/rev/f977d6cfa973 Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi https://hg.mozilla.org/integration/autoland/rev/7483e84149d8 Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika https://hg.mozilla.org/integration/autoland/rev/58c31e9d6ae3 Remove nsClassHashtable::LookupForAddFromFactory and use GetOrInsertWith instead. r=xpcom-reviewers,nika https://hg.mozilla.org/integration/autoland/rev/22dc870ee609 Always hold PrefCallback in a UniquePtr in nsPrefBranch::AddObserverImpl. r=KrisWright
Comment 14•3 years ago
|
||
Backed out for causing hazard failures in nsXULPrototypeCache
Backout link: https://hg.mozilla.org/integration/autoland/rev/6ee7daf9a461d51c9ef7b70e177074d2e568f30f
Failure log: https://treeherder.mozilla.org/logviewer?job_id=329997413&repo=autoland&lineNumber=18186
Assignee | ||
Comment 15•3 years ago
|
||
Re-landed the two patches before the regression from comment 14 was introduced.
Comment 16•3 years ago
|
||
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/88c07c36a9f3 Implement nsBaseHashtable::GetOrInsertWith and nsBaseHashtable::GetOrInsert with user-defined constructor arguments. r=xpcom-reviewers,nika https://hg.mozilla.org/integration/autoland/rev/5dcb40e333f1 Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Assignee | ||
Comment 17•3 years ago
|
||
The offending patch will be moved to Bug 1692880.
Comment 18•3 years ago
|
||
Comment on attachment 9202637 [details]
Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=#xpcom-reviewers
Revision D104850 was moved to bug 1692880. Setting attachment 9202637 [details] to obsolete.
Comment 19•3 years ago
|
||
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e884c5cba34 Remove nsClassHashtable::LookupForAddFromFactory and use GetOrInsertWith instead. r=xpcom-reviewers,nika https://hg.mozilla.org/integration/autoland/rev/9985953875a4 Always hold PrefCallback in a UniquePtr in nsPrefBranch::AddObserverImpl. r=KrisWright https://hg.mozilla.org/integration/autoland/rev/62ca610656d6 Simplify uses of GetOrInsert where non-default-constructed entries are eventually inserted. r=xpcom-reviewers,necko-reviewers,nika,valentin
Comment 20•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Comment 21•3 years ago
|
||
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ffdf55cd2080 Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
Comment 22•3 years ago
|
||
bugherder |
Description
•