Merge mozilla-inbound to mozilla-central. a=merge

This commit is contained in:
Cosmin Sabou 2018-07-23 18:48:54 +03:00
commit d160ac574a
5 changed files with 41 additions and 8 deletions

View File

@ -256,7 +256,7 @@ already_AddRefed<SharedThreadPool> GetMediaThreadPool(MediaThreadType aType)
}
}
return already_AddRefed<SharedThreadPool>(pool.forget());
return pool.forget();
}
bool

View File

@ -0,0 +1,7 @@
if (!wasmGcEnabled()) {
quit(0);
}
enableShellAllocationMetadataBuilder();
gczeal(9, 1);
new WebAssembly.Global({ value: 'i32' }, 42);

View File

@ -2155,6 +2155,12 @@ const Class WasmGlobalObject::class_ =
WasmGlobalObject::trace(JSTracer* trc, JSObject* obj)
{
WasmGlobalObject* global = reinterpret_cast<WasmGlobalObject*>(obj);
if (global->isNewborn()) {
// This can happen while we're allocating the object, in which case
// every single slot of the object is not defined yet. In particular,
// there's nothing to trace yet.
return;
}
switch (global->type().code()) {
case ValType::AnyRef:
if (global->cell()->ptr)
@ -2230,6 +2236,8 @@ WasmGlobalObject::create(JSContext* cx, HandleVal hval, bool isMutable)
obj->initReservedSlot(MUTABLE_SLOT, JS::BooleanValue(isMutable));
obj->initReservedSlot(CELL_SLOT, PrivateValue(cell));
MOZ_ASSERT(!obj->isNewborn());
return obj;
}

View File

@ -22,6 +22,8 @@
#include <ostream>
#include <type_traits>
class nsCycleCollectionTraversalCallback;
namespace mozilla {
struct Nothing { };
@ -713,6 +715,28 @@ operator>=(const Maybe<T>& aLHS, const Maybe<T>& aRHS)
return !(aLHS < aRHS);
}
template<typename T>
void
ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback,
Maybe<T>& aMaybe,
const char* aName,
uint32_t aFlags = 0)
{
if (aMaybe.isSome()) {
ImplCycleCollectionTraverse(aCallback, aMaybe.ref(), aName, aFlags);
}
}
template<typename T>
void
ImplCycleCollectionUnlink(Maybe<T>& aMaybe)
{
if (aMaybe.isSome()) {
ImplCycleCollectionUnlink(aMaybe.ref());
}
}
} // namespace mozilla
#endif /* mozilla_Maybe_h */

View File

@ -186,17 +186,11 @@ VARCACHE_PREF(
// Clear-Site-Data prefs
//---------------------------------------------------------------------------
#ifdef NIGHTLY_BUILD
# define PREF_VALUE true
#else
# define PREF_VALUE false
#endif
VARCACHE_PREF(
"dom.clearSiteData.enabled",
dom_clearSiteData_enabled,
bool, PREF_VALUE
bool, true
)
#undef PREF_VALUE
//---------------------------------------------------------------------------
// Full-screen prefs