/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// These types implement the same interface as mozilla::(Atomic)RefCounted and // must be used instead of mozilla::(Atomic)RefCounted for everything in // SpiderMonkey. This is because Release() needs to call js_delete, not delete.
namespace js {
template <typename T> class RefCounted { staticconst MozRefCountType DEAD = 0xffffdead;
template <typename T> class AtomicRefCounted { // On 64-bit systems, if the refcount type is small (say, 32 bits), there's // a risk that it could overflow. So require it to be large enough.
static_assert(sizeof(MozRefCountType) == sizeof(uintptr_t), "You're at risk for ref count overflow.");
staticconst MozRefCountType DEAD = ~MozRefCountType(0xffff) | 0xdead;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.