mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 839998 - Replace thisDuringConstruction() with MOZ_THIS_IN_INITIALIZER_LIST(). r=waldo
This commit is contained in:
parent
f7d20e1769
commit
2b3b31ec7e
@ -50,10 +50,8 @@ class BumpChunk
|
||||
char *headerBase() { return reinterpret_cast<char *>(this); }
|
||||
char *bumpBase() const { return limit - bumpSpaceSize; }
|
||||
|
||||
BumpChunk *thisDuringConstruction() { return this; }
|
||||
|
||||
explicit BumpChunk(size_t bumpSpaceSize)
|
||||
: bump(reinterpret_cast<char *>(thisDuringConstruction()) + sizeof(BumpChunk)),
|
||||
: bump(reinterpret_cast<char *>(MOZ_THIS_IN_INITIALIZER_LIST()) + sizeof(BumpChunk)),
|
||||
limit(bump + bumpSpaceSize),
|
||||
next_(NULL), bumpSpaceSize(bumpSpaceSize)
|
||||
{
|
||||
|
@ -1180,7 +1180,7 @@ JSContext::JSContext(JSRuntime *rt)
|
||||
enterCompartmentDepth_(0),
|
||||
savedFrameChains_(),
|
||||
defaultCompartmentObject_(NULL),
|
||||
cycleDetectorSet(thisDuringConstruction()),
|
||||
cycleDetectorSet(MOZ_THIS_IN_INITIALIZER_LIST()),
|
||||
errorReporter(NULL),
|
||||
operationCallback(NULL),
|
||||
data(NULL),
|
||||
|
@ -1636,7 +1636,6 @@ struct JSContext : js::ThreadSafeContext,
|
||||
public mozilla::LinkedListElement<JSContext>
|
||||
{
|
||||
explicit JSContext(JSRuntime *rt);
|
||||
JSContext *thisDuringConstruction() { return this; }
|
||||
~JSContext();
|
||||
|
||||
JSRuntime *runtime() const { return runtime_; }
|
||||
|
@ -1032,11 +1032,9 @@ class AutoPropertyDescriptorRooter : private AutoGCRooter, public PropertyDescri
|
||||
{
|
||||
SkipRoot skip;
|
||||
|
||||
AutoPropertyDescriptorRooter *thisDuringConstruction() { return this; }
|
||||
|
||||
public:
|
||||
AutoPropertyDescriptorRooter(JSContext *cx)
|
||||
: AutoGCRooter(cx, DESCRIPTOR), skip(cx, thisDuringConstruction())
|
||||
: AutoGCRooter(cx, DESCRIPTOR), skip(cx, MOZ_THIS_IN_INITIALIZER_LIST())
|
||||
{
|
||||
obj = NULL;
|
||||
attrs = 0;
|
||||
@ -1046,7 +1044,7 @@ class AutoPropertyDescriptorRooter : private AutoGCRooter, public PropertyDescri
|
||||
}
|
||||
|
||||
AutoPropertyDescriptorRooter(JSContext *cx, PropertyDescriptor *desc)
|
||||
: AutoGCRooter(cx, DESCRIPTOR), skip(cx, thisDuringConstruction())
|
||||
: AutoGCRooter(cx, DESCRIPTOR), skip(cx, MOZ_THIS_IN_INITIALIZER_LIST())
|
||||
{
|
||||
obj = desc->obj;
|
||||
attrs = desc->attrs;
|
||||
|
@ -104,8 +104,6 @@ class MOZ_STACK_CLASS JSONParser : private AutoGCRooter
|
||||
Token lastToken;
|
||||
#endif
|
||||
|
||||
JSONParser *thisDuringConstruction() { return this; }
|
||||
|
||||
public:
|
||||
/* Public API */
|
||||
|
||||
|
@ -107,12 +107,10 @@ class LinkedListElement
|
||||
LinkedListElement* prev;
|
||||
const bool isSentinel;
|
||||
|
||||
LinkedListElement* thisDuringConstruction() { return this; }
|
||||
|
||||
public:
|
||||
LinkedListElement()
|
||||
: next(thisDuringConstruction()),
|
||||
prev(thisDuringConstruction()),
|
||||
: next(MOZ_THIS_IN_INITIALIZER_LIST()),
|
||||
prev(MOZ_THIS_IN_INITIALIZER_LIST()),
|
||||
isSentinel(false)
|
||||
{ }
|
||||
|
||||
@ -201,8 +199,8 @@ class LinkedListElement
|
||||
};
|
||||
|
||||
LinkedListElement(NodeKind nodeKind)
|
||||
: next(thisDuringConstruction()),
|
||||
prev(thisDuringConstruction()),
|
||||
: next(MOZ_THIS_IN_INITIALIZER_LIST()),
|
||||
prev(MOZ_THIS_IN_INITIALIZER_LIST()),
|
||||
isSentinel(nodeKind == NODE_KIND_SENTINEL)
|
||||
{ }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user