mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Merge mozilla-inbound to mozilla-central. a=merge
This commit is contained in:
commit
d160ac574a
@ -256,7 +256,7 @@ already_AddRefed<SharedThreadPool> GetMediaThreadPool(MediaThreadType aType)
|
||||
}
|
||||
}
|
||||
|
||||
return already_AddRefed<SharedThreadPool>(pool.forget());
|
||||
return pool.forget();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -0,0 +1,7 @@
|
||||
if (!wasmGcEnabled()) {
|
||||
quit(0);
|
||||
}
|
||||
|
||||
enableShellAllocationMetadataBuilder();
|
||||
gczeal(9, 1);
|
||||
new WebAssembly.Global({ value: 'i32' }, 42);
|
@ -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;
|
||||
}
|
||||
|
||||
|
24
mfbt/Maybe.h
24
mfbt/Maybe.h
@ -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 */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user