gecko-dev/js
Nicholas Nethercote d4f517f3e2 Bug 1483182 - Don't allocate in HashTable::lookupOrAdd(). r=luke
Currently lookupOrAdd() will allocate if the table has no storage. But it
doesn't report an error if the allocation fails, which can cause problems.

This patch changes things so that lookupOrAdd() doesn't allocate when the table
has no storage. Instead, it returns an AddPtr that is not *valid* (its mTable
is empty) but it is *live*, and can be used in add(), whereupon the allocation
will occur.

The patch also makes Ptr::isValid() and AddPtr::isValid() non-public, because
the valid vs. live distinction is non-obvious and best kept hidden within the
classes.

--HG--
extra : rebase_source : 95d58725d92cc83332e27a61f98fa61185440e26
2018-08-21 13:49:17 +10:00
..
ductwork/debugger Bug 1479363 part 10 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in other directories. r=mrbkap 2018-08-02 19:30:17 +02:00
examples
ipc Bug 1481998 - Make mozilla::Hash{Map,Set}'s entry storage allocation lazy. r=luke,sfink 2018-08-10 18:00:29 +10:00
public Bug 1484421 - Move JSON-related functionality into js/public/JSON.h that isn't #include'd in jsapi.h. r=jandem 2018-08-20 07:54:45 -07:00
rust Bug 1033916 followup - Fix SpiderMonkey Rust bindings by including jsapi.h in wrapper.hpp instead of relying on jsfriendapi.h doing it. r=me 2018-08-21 09:53:23 +02:00
src Bug 1483182 - Don't allocate in HashTable::lookupOrAdd(). r=luke 2018-08-21 13:49:17 +10:00
xpconnect Bug 1033916 - Move JSAutoByteString out of jsapi.h into js/public/AutoByteString.h, incidentally breaking the jsfriendapi.h -> jsapi.h dependency. r=jandem 2018-08-20 07:46:08 -07:00
app.mozbuild
ffi.configure
moz.build
moz.configure Bug 1444141 - part 4 - make the JS engine depend on Rust; r=chmanchester,glandium,jorendorff 2018-08-02 11:00:21 -05:00