mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 797217 - Replace InternalHandleBase::zeroPointer with NullPtr::constNullValue. r=terrence
--HG-- extra : rebase_source : f70e1d996fb01e790b277524128faa68060dac6d
This commit is contained in:
parent
5f92bc6efb
commit
3110eb99d4
@ -261,17 +261,11 @@ namespace js {
|
||||
* when you need a parameter type for something that *may* be a pointer to a
|
||||
* direct field of a gcthing.
|
||||
*/
|
||||
class InternalHandleBase
|
||||
{
|
||||
protected:
|
||||
static void * const zeroPointer;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class InternalHandle { };
|
||||
|
||||
template <typename T>
|
||||
class InternalHandle<T*> : public InternalHandleBase
|
||||
class InternalHandle<T*>
|
||||
{
|
||||
void * const *holder;
|
||||
size_t offset;
|
||||
@ -316,7 +310,7 @@ class InternalHandle<T*> : public InternalHandleBase
|
||||
* fromMarkedLocation().
|
||||
*/
|
||||
InternalHandle(T *field)
|
||||
: holder(reinterpret_cast<void * const *>(&zeroPointer)),
|
||||
: holder(reinterpret_cast<void * const *>(&NullPtr::constNullValue)),
|
||||
offset(uintptr_t(field))
|
||||
{
|
||||
}
|
||||
|
@ -114,8 +114,6 @@ using namespace js::gc;
|
||||
|
||||
namespace js {
|
||||
|
||||
void * const InternalHandleBase::zeroPointer = NULL;
|
||||
|
||||
namespace gc {
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user