diff --git a/base/src/nsVariant.cpp b/base/src/nsVariant.cpp index 3ae233fd2590..b74a0c4b08f4 100644 --- a/base/src/nsVariant.cpp +++ b/base/src/nsVariant.cpp @@ -56,7 +56,10 @@ nsVariant::~nsVariant() { switch (mType) { case nsVariantType_voidPtr: - delete (void *)mValue; + /* XXX: Per comments from Warren, commenting this out. + This code isn't done (or used), and is a violation + of ANSI C++ to boot. -- Bruce */ + /* delete (void *)mValue; */ break; case nsVariantType_charPtr: nsCRT::free(mValue.mUnion._charPtr); diff --git a/xpcom/ds/nsVariant.cpp b/xpcom/ds/nsVariant.cpp index 3ae233fd2590..b74a0c4b08f4 100644 --- a/xpcom/ds/nsVariant.cpp +++ b/xpcom/ds/nsVariant.cpp @@ -56,7 +56,10 @@ nsVariant::~nsVariant() { switch (mType) { case nsVariantType_voidPtr: - delete (void *)mValue; + /* XXX: Per comments from Warren, commenting this out. + This code isn't done (or used), and is a violation + of ANSI C++ to boot. -- Bruce */ + /* delete (void *)mValue; */ break; case nsVariantType_charPtr: nsCRT::free(mValue.mUnion._charPtr);