Fix C++ violation tolerated by GCC and MSVC, caught by Clang (623303, rs=luke).
authorBrendan Eich <brendan@mozilla.org>
Tue, 11 Jan 2011 11:12:59 -0800
changeset 60548 28b9e078da4a26412d849fbcbcdf501f828befc1
parent 60547 63d4e88f112fab678ac1e6d71126fe52950aa41f
child 60549 000cb7431848b7299e5258794cd5155a4e6cf422
push id18037
push usercleary@mozilla.com
push dateFri, 14 Jan 2011 17:42:55 +0000
treeherdermozilla-central@4e0501a0c5e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs623303
milestone2.0b9pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fix C++ violation tolerated by GCC and MSVC, caught by Clang (623303, rs=luke).
js/src/jspropertytree.cpp
--- a/js/src/jspropertytree.cpp
+++ b/js/src/jspropertytree.cpp
@@ -387,17 +387,17 @@ PropertyTree::getChild(JSContext *cx, Sh
                                 KidsHash *hash = HashChunks(chunk, n);
                                 if (!hash) {
                                     JS_ReportOutOfMemory(cx);
                                     return NULL;
                                 }
 
                                 JS_LOCK_GC(cx->runtime);
                                 if (kidp->isHash()) {
-                                    hash->KidsHash::~KidsHash();
+                                    hash->~KidsHash();
                                     js_free(hash);
                                 } else {
                                     // FIXME unsafe race with kidp->is/toChunk() above.
                                     // But this is all going single-threaded soon...
                                     while (chunk)
                                         chunk = KidsChunk::destroy(cx, chunk);
                                     kidp->setHash(hash);
                                 }
@@ -656,17 +656,17 @@ js::PropertyTree::orphanKids(JSContext *
         for (KidsHash::Range range = hash->all(); !range.empty(); range.popFront()) {
             Shape *kid = range.front();
             if (!JSID_IS_VOID(kid->id)) {
                 JS_ASSERT(kid->parent == shape);
                 kid->parent = NULL;
             }
         }
 
-        hash->KidsHash::~KidsHash();
+        hash->~KidsHash();
         js_free(hash);
     }
 
     kidp->setNull();
 }
 
 void
 js::PropertyTree::sweepShapes(JSContext *cx)