author | Wes Kocher <wkocher@mozilla.com> |
Wed, 16 Nov 2016 16:16:32 -0800 | |
changeset 322862 | c428116222e76099999ba5ea0e9178daac7580f9 |
parent 322861 | b3b9d24cdb9732fe64ebf2f4486458556b6450db |
child 322863 | ed48815cbe18f8c787bb9441e35e6c9fc4c4be42 |
push id | 83994 |
push user | kwierso@gmail.com |
push date | Thu, 17 Nov 2016 00:17:06 +0000 |
treeherder | mozilla-inbound@c428116222e7 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | backout |
bugs | 1316119 |
milestone | 53.0a1 |
backs out | 0e27121698e4290495ce00e04b2778d2856c62a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/xpcom/glue/nsBaseHashtable.h +++ b/xpcom/glue/nsBaseHashtable.h @@ -111,32 +111,16 @@ public: if (!ent) { return UserDataType{}; } return ent->mData; } /** - * Add key to the table if not already present, and return a reference to its - * value. If key is not already in the table then the value is default - * constructed. - */ - DataType& GetOrInsert(const KeyType& aKey) - { - EntryType* ent = this->GetEntry(aKey); - if (ent) { - return ent->mData; - } - - ent = this->PutEntry(aKey); - return ent->mData; - } - - /** * put a new value for the associated key * @param aKey the key to put * @param aData the new data * @return always true, unless memory allocation failed */ void Put(KeyType aKey, const UserDataType& aData) { if (!Put(aKey, aData, mozilla::fallible)) {