Bug 797217 - Replace InternalHandleBase::zeroPointer with NullPtr::constNullValue. r=terrence

--HG--
extra : rebase_source : f70e1d996fb01e790b277524128faa68060dac6d
This commit is contained in:
Steve Fink 2012-10-05 13:16:39 -07:00
parent 5f92bc6efb
commit 3110eb99d4
2 changed files with 2 additions and 10 deletions

View File

@ -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))
{
}

View File

@ -114,8 +114,6 @@ using namespace js::gc;
namespace js {
void * const InternalHandleBase::zeroPointer = NULL;
namespace gc {
/*