Backed out 2 changesets (bug 1121297) for Cpp bustage on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 16 Jan 2015 15:21:25 -0800
changeset 224347 a7b0fe4de1036d6e55f7918883d2359fbbeb3224
parent 224346 13c3bf8c3e212cb707e517162d97e57710a93396
child 224348 1810fd0f78b4a88684e21e0fc634c7ff51e55814
push id10872
push userphilringnalda@gmail.com
push dateSat, 17 Jan 2015 21:13:39 +0000
treeherderfx-team@35df417b93a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1121297
milestone38.0a1
backs out28960bb167ef6156f2f3964d7e1f57eaf207bde4
005cf05954e7d3ecdccbb52d3385da937c5cbef2
Backed out 2 changesets (bug 1121297) for Cpp bustage on a CLOSED TREE Backed out changeset 28960bb167ef (bug 1121297) Backed out changeset 005cf05954e7 (bug 1121297)
memory/mozalloc/VolatileBuffer.h
memory/mozalloc/VolatileBufferAshmem.cpp
memory/mozalloc/VolatileBufferFallback.cpp
memory/mozalloc/VolatileBufferOSX.cpp
memory/mozalloc/VolatileBufferWindows.cpp
memory/mozalloc/moz.build
memory/mozalloc/tests/TestVolatileBuffer.cpp
memory/mozalloc/tests/moz.build
memory/volatile/VolatileBuffer.h
memory/volatile/VolatileBufferAshmem.cpp
memory/volatile/VolatileBufferFallback.cpp
memory/volatile/VolatileBufferOSX.cpp
memory/volatile/VolatileBufferWindows.cpp
memory/volatile/moz.build
memory/volatile/tests/TestVolatileBuffer.cpp
memory/volatile/tests/moz.build
moz.build
rename from memory/volatile/VolatileBuffer.h
rename to memory/mozalloc/VolatileBuffer.h
--- a/memory/volatile/VolatileBuffer.h
+++ b/memory/mozalloc/VolatileBuffer.h
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozalloc_VolatileBuffer_h
 #define mozalloc_VolatileBuffer_h
 
 #include "mozilla/mozalloc.h"
-#include "mozilla/Mutex.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/MemoryReporting.h"
 
 /* VolatileBuffer
  *
  * This class represents a piece of memory that can potentially be reclaimed
  * by the OS when not in use. As long as there are one or more
  * VolatileBufferPtrs holding on to a VolatileBuffer, the memory will remain
@@ -32,51 +31,42 @@
  * The OS cannot purge a buffer immediately after a VolatileBuffer is
  * initialized. At least one VolatileBufferPtr must be created before the
  * buffer can be purged, so the first use of VolatileBufferPtr does not need
  * to check WasPurged().
  *
  * When a buffer is purged, some or all of the buffer is zeroed out. This
  * API cannot tell which parts of the buffer were lost.
  *
- * VolatileBuffer and VolatileBufferPtr are threadsafe.
+ * VolatileBuffer is not thread safe. Do not use VolatileBufferPtrs on
+ * different threads.
  */
 
 namespace mozilla {
 
-class VolatileBuffer
+class MOZALLOC_EXPORT VolatileBuffer : public RefCounted<VolatileBuffer>
 {
   friend class VolatileBufferPtr_base;
 public:
   MOZ_DECLARE_REFCOUNTED_TYPENAME(VolatileBuffer)
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VolatileBuffer)
-
   VolatileBuffer();
+  ~VolatileBuffer();
 
   /* aAlignment must be a multiple of the pointer size */
   bool Init(size_t aSize, size_t aAlignment = sizeof(void*));
 
   size_t HeapSizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const;
   size_t NonHeapSizeOfExcludingThis() const;
   bool OnHeap() const;
 
 protected:
   bool Lock(void** aBuf);
   void Unlock();
 
 private:
-  ~VolatileBuffer();
-
-  /**
-   * Protects mLockCount, mFirstLock, and changes to the volatility of our
-   * buffer.  Other member variables are read-only except in Init() and the
-   * destructor.
-   */
-  Mutex mMutex;
-
   void* mBuf;
   size_t mSize;
   int mLockCount;
 #if defined(ANDROID)
   int mFd;
 #elif defined(XP_DARWIN)
   bool mHeap;
 #elif defined(XP_WIN)
rename from memory/volatile/VolatileBufferAshmem.cpp
rename to memory/mozalloc/VolatileBufferAshmem.cpp
--- a/memory/volatile/VolatileBufferAshmem.cpp
+++ b/memory/mozalloc/VolatileBufferAshmem.cpp
@@ -17,18 +17,17 @@
 extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size);
 #endif
 
 #define MIN_VOLATILE_ALLOC_SIZE 8192
 
 namespace mozilla {
 
 VolatileBuffer::VolatileBuffer()
-  : mMutex("VolatileBuffer")
-  , mBuf(nullptr)
+  : mBuf(nullptr)
   , mSize(0)
   , mLockCount(0)
   , mFd(-1)
 {
 }
 
 bool
 VolatileBuffer::Init(size_t aSize, size_t aAlignment)
@@ -68,48 +67,42 @@ heap_alloc:
 #else
   mBuf = memalign(aAlignment, aSize);
 #endif
   return !!mBuf;
 }
 
 VolatileBuffer::~VolatileBuffer()
 {
-  MOZ_ASSERT(mLockCount == 0, "Being destroyed with non-zero lock count?");
-
   if (OnHeap()) {
     free(mBuf);
   } else {
     munmap(mBuf, mSize);
     close(mFd);
   }
 }
 
 bool
 VolatileBuffer::Lock(void** aBuf)
 {
-  MutexAutoLock lock(mMutex);
-
   MOZ_ASSERT(mBuf, "Attempting to lock an uninitialized VolatileBuffer");
 
   *aBuf = mBuf;
   if (++mLockCount > 1 || OnHeap()) {
     return true;
   }
 
   // Zero offset and zero length means we want to pin/unpin the entire thing.
   struct ashmem_pin pin = { 0, 0 };
   return ioctl(mFd, ASHMEM_PIN, &pin) == ASHMEM_NOT_PURGED;
 }
 
 void
 VolatileBuffer::Unlock()
 {
-  MutexAutoLock lock(mMutex);
-
   MOZ_ASSERT(mLockCount > 0, "VolatileBuffer unlocked too many times!");
   if (--mLockCount || OnHeap()) {
     return;
   }
 
   struct ashmem_pin pin = { 0, 0 };
   ioctl(mFd, ASHMEM_UNPIN, &pin);
 }
rename from memory/volatile/VolatileBufferFallback.cpp
rename to memory/mozalloc/VolatileBufferFallback.cpp
--- a/memory/volatile/VolatileBufferFallback.cpp
+++ b/memory/mozalloc/VolatileBufferFallback.cpp
@@ -8,69 +8,58 @@
 
 #ifdef MOZ_MEMORY
 int posix_memalign(void** memptr, size_t alignment, size_t size);
 #endif
 
 namespace mozilla {
 
 VolatileBuffer::VolatileBuffer()
-  : mMutex("VolatileBuffer")
-  , mBuf(nullptr)
+  : mBuf(nullptr)
   , mSize(0)
   , mLockCount(0)
 {
 }
 
 bool VolatileBuffer::Init(size_t aSize, size_t aAlignment)
 {
   MOZ_ASSERT(!mSize && !mBuf, "Init called twice");
   MOZ_ASSERT(!(aAlignment % sizeof(void *)),
              "Alignment must be multiple of pointer size");
 
   mSize = aSize;
 #if defined(MOZ_MEMORY)
-  if (posix_memalign(&mBuf, aAlignment, aSize) != 0) {
-    return false;
-  }
+  posix_memalign(&mBuf, aAlignment, aSize);
 #elif defined(HAVE_POSIX_MEMALIGN)
-  if (moz_posix_memalign(&mBuf, aAlignment, aSize) != 0) {
-    return false;
-  }
+  (void)moz_posix_memalign(&mBuf, aAlignment, aSize);
 #else
 #error "No memalign implementation found"
 #endif
   return !!mBuf;
 }
 
 VolatileBuffer::~VolatileBuffer()
 {
-  MOZ_ASSERT(mLockCount == 0, "Being destroyed with non-zero lock count?");
-
   free(mBuf);
 }
 
 bool
 VolatileBuffer::Lock(void** aBuf)
 {
-  MutexAutoLock lock(mMutex);
-
   MOZ_ASSERT(mBuf, "Attempting to lock an uninitialized VolatileBuffer");
 
   *aBuf = mBuf;
   mLockCount++;
 
   return true;
 }
 
 void
 VolatileBuffer::Unlock()
 {
-  MutexAutoLock lock(mMutex);
-
   mLockCount--;
   MOZ_ASSERT(mLockCount >= 0, "VolatileBuffer unlocked too many times!");
 }
 
 bool
 VolatileBuffer::OnHeap() const
 {
   return true;
rename from memory/volatile/VolatileBufferOSX.cpp
rename to memory/mozalloc/VolatileBufferOSX.cpp
--- a/memory/volatile/VolatileBufferOSX.cpp
+++ b/memory/mozalloc/VolatileBufferOSX.cpp
@@ -11,18 +11,17 @@
 #include <sys/mman.h>
 #include <unistd.h>
 
 #define MIN_VOLATILE_ALLOC_SIZE 8192
 
 namespace mozilla {
 
 VolatileBuffer::VolatileBuffer()
-  : mMutex("VolatileBuffer")
-  , mBuf(nullptr)
+  : mBuf(nullptr)
   , mSize(0)
   , mLockCount(0)
   , mHeap(false)
 {
 }
 
 bool
 VolatileBuffer::Init(size_t aSize, size_t aAlignment)
@@ -49,30 +48,26 @@ VolatileBuffer::Init(size_t aSize, size_
 heap_alloc:
   (void)moz_posix_memalign(&mBuf, aAlignment, aSize);
   mHeap = true;
   return !!mBuf;
 }
 
 VolatileBuffer::~VolatileBuffer()
 {
-  MOZ_ASSERT(mLockCount == 0, "Being destroyed with non-zero lock count?");
-
   if (OnHeap()) {
     free(mBuf);
   } else {
     vm_deallocate(mach_task_self(), (vm_address_t)mBuf, mSize);
   }
 }
 
 bool
 VolatileBuffer::Lock(void** aBuf)
 {
-  MutexAutoLock lock(mMutex);
-
   MOZ_ASSERT(mBuf, "Attempting to lock an uninitialized VolatileBuffer");
 
   *aBuf = mBuf;
   if (++mLockCount > 1 || OnHeap()) {
     return true;
   }
 
   int state = VM_PURGABLE_NONVOLATILE;
@@ -82,18 +77,16 @@ VolatileBuffer::Lock(void** aBuf)
                         VM_PURGABLE_SET_STATE,
                         &state);
   return ret == KERN_SUCCESS && !(state & VM_PURGABLE_EMPTY);
 }
 
 void
 VolatileBuffer::Unlock()
 {
-  MutexAutoLock lock(mMutex);
-
   MOZ_ASSERT(mLockCount > 0, "VolatileBuffer unlocked too many times!");
   if (--mLockCount || OnHeap()) {
     return;
   }
 
   int state = VM_PURGABLE_VOLATILE | VM_VOLATILE_GROUP_DEFAULT;
   DebugOnly<kern_return_t> ret =
     vm_purgable_control(mach_task_self(),
rename from memory/volatile/VolatileBufferWindows.cpp
rename to memory/mozalloc/VolatileBufferWindows.cpp
--- a/memory/volatile/VolatileBufferWindows.cpp
+++ b/memory/mozalloc/VolatileBufferWindows.cpp
@@ -1,12 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#if defined(XP_WIN)
+#  define MOZALLOC_EXPORT __declspec(dllexport)
+#endif
+
 #include "VolatileBuffer.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/mozalloc.h"
 #include "mozilla/WindowsVersion.h"
 
 #include <windows.h>
 
 #ifdef MOZ_MEMORY
@@ -17,18 +21,17 @@ extern "C" int posix_memalign(void** mem
 #define MEM_RESET_UNDO 0x1000000
 #endif
 
 #define MIN_VOLATILE_ALLOC_SIZE 8192
 
 namespace mozilla {
 
 VolatileBuffer::VolatileBuffer()
-  : mMutex("VolatileBuffer")
-  , mBuf(nullptr)
+  : mBuf(nullptr)
   , mSize(0)
   , mLockCount(0)
   , mHeap(false)
   , mFirstLock(true)
 {
 }
 
 bool
@@ -64,34 +67,30 @@ heap_alloc:
   mBuf = _aligned_malloc(aSize, aAlignment);
 #endif
   mHeap = true;
   return !!mBuf;
 }
 
 VolatileBuffer::~VolatileBuffer()
 {
-  MOZ_ASSERT(mLockCount == 0, "Being destroyed with non-zero lock count?");
-
   if (OnHeap()) {
 #ifdef MOZ_MEMORY
     free(mBuf);
 #else
     _aligned_free(mBuf);
 #endif
   } else {
     VirtualFreeEx(GetCurrentProcess(), mBuf, 0, MEM_RELEASE);
   }
 }
 
 bool
 VolatileBuffer::Lock(void** aBuf)
 {
-  MutexAutoLock lock(mMutex);
-
   MOZ_ASSERT(mBuf, "Attempting to lock an uninitialized VolatileBuffer");
 
   *aBuf = mBuf;
   if (++mLockCount > 1 || OnHeap()) {
     return true;
   }
 
   // MEM_RESET_UNDO's behavior is undefined when called on memory that
@@ -107,18 +106,16 @@ VolatileBuffer::Lock(void** aBuf)
                               MEM_RESET_UNDO,
                               PAGE_READWRITE);
   return !!addr;
 }
 
 void
 VolatileBuffer::Unlock()
 {
-  MutexAutoLock lock(mMutex);
-
   MOZ_ASSERT(mLockCount > 0, "VolatileBuffer unlocked too many times!");
   if (--mLockCount || OnHeap()) {
     return;
   }
 
   void* addr = VirtualAllocEx(GetCurrentProcess(),
                               mBuf,
                               mSize,
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -5,16 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 NO_VISIBILITY_FLAGS = True
 
 EXPORTS.mozilla += [
     'fallible.h',
     'mozalloc.h',
     'mozalloc_abort.h',
     'mozalloc_oom.h',
+    'VolatileBuffer.h',
 ]
 
 if CONFIG['MOZ_MSVC_STL_WRAP__RAISE'] or CONFIG['MOZ_MSVC_STL_WRAP__Throw']:
     build_msvc_wrappers = 1
 else:
     build_msvc_wrappers = 0
 
 if CONFIG['WRAP_STL_INCLUDES']:
@@ -34,23 +35,42 @@ if CONFIG['WRAP_STL_INCLUDES']:
             ]
 
 UNIFIED_SOURCES += [
     'mozalloc.cpp',
     'mozalloc_abort.cpp',
     'mozalloc_oom.cpp',
 ]
 
+if CONFIG['OS_TARGET'] == 'Android':
+    UNIFIED_SOURCES += [
+        'VolatileBufferAshmem.cpp',
+    ]
+elif CONFIG['OS_TARGET'] == 'Darwin':
+    UNIFIED_SOURCES += [
+        'VolatileBufferOSX.cpp',
+    ]
+elif CONFIG['OS_TARGET'] == 'WINNT':
+    UNIFIED_SOURCES += [
+        'VolatileBufferWindows.cpp',
+    ]
+else:
+    UNIFIED_SOURCES += [
+        'VolatileBufferFallback.cpp',
+    ]
+
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     Library('mozalloc')
 else:
     GeckoSharedLibrary('mozalloc', linkage=None)
     SDK_LIBRARY = True
 
 # The strndup declaration in string.h is in an ifdef __USE_GNU section
 DEFINES['_GNU_SOURCE'] = True
 
+TEST_DIRS += ['tests']
+
 GENERATED_INCLUDES += ['/xpcom']
 
 DISABLE_STL_WRAPPING = True
 
 if CONFIG['CLANG_CXX'] or CONFIG['_MSC_VER']:
     FAIL_ON_WARNINGS = True
rename from memory/volatile/tests/TestVolatileBuffer.cpp
rename to memory/mozalloc/tests/TestVolatileBuffer.cpp
--- a/memory/volatile/tests/TestVolatileBuffer.cpp
+++ b/memory/mozalloc/tests/TestVolatileBuffer.cpp
@@ -1,102 +1,143 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "gtest/gtest.h"
+#include "TestHarness.h"
 #include "mozilla/VolatileBuffer.h"
 #include <string.h>
 
 #if defined(ANDROID)
 #include <fcntl.h>
 #include <linux/ashmem.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #elif defined(XP_DARWIN)
 #include <mach/mach.h>
 #endif
 
 using namespace mozilla;
 
-TEST(VolatileBufferTest, HeapVolatileBuffersWork)
+int main(int argc, char **argv)
 {
-  RefPtr<VolatileBuffer> heapbuf = new VolatileBuffer();
+  ScopedXPCOM xpcom("VolatileBufferTests");
+  if (xpcom.failed()) {
+    return 1;
+  }
 
-  ASSERT_TRUE(heapbuf) << "Failed to create VolatileBuffer";
-  ASSERT_TRUE(heapbuf->Init(512)) << "Failed to initialize VolatileBuffer";
-
-  VolatileBufferPtr<char> ptr(heapbuf);
+  RefPtr<VolatileBuffer> heapbuf = new VolatileBuffer();
+  if (!heapbuf || !heapbuf->Init(512)) {
+    fail("Failed to initialize VolatileBuffer");
+    return 1;
+  }
 
-  EXPECT_FALSE(ptr.WasBufferPurged())
-    << "Buffer should not be purged immediately after initialization";
-  EXPECT_TRUE(ptr) << "Couldn't get pointer from VolatileBufferPtr";
-}
+  {
+    VolatileBufferPtr<char> ptr(heapbuf);
+    if (ptr.WasBufferPurged()) {
+      fail("Buffer was immediately purged after initialization");
+      return 1;
+    }
 
-TEST(VolatileBufferTest, RealVolatileBuffersWork)
-{
+    if (!ptr) {
+      fail("Didn't get a pointer");
+      return 1;
+    }
+  }
+
   RefPtr<VolatileBuffer> buf = new VolatileBuffer();
-
-  ASSERT_TRUE(buf) << "Failed to create VolatileBuffer";
-  ASSERT_TRUE(buf->Init(16384)) << "Failed to initialize VolatileBuffer";
+  if (!buf || !buf->Init(16384)) {
+    fail("Failed to initialize VolatileBuffer");
+    return 1;
+  }
 
   const char teststr[] = "foobar";
 
   {
     VolatileBufferPtr<char> ptr(buf);
+    if (ptr.WasBufferPurged()) {
+      fail("Buffer should not be purged immediately after initialization");
+      return 1;
+    }
 
-    EXPECT_FALSE(ptr.WasBufferPurged())
-      << "Buffer should not be purged immediately after initialization";
-    EXPECT_TRUE(ptr) << "Couldn't get pointer from VolatileBufferPtr";
+    if (!ptr) {
+      fail("Didn't get a pointer");
+      return 1;
+    }
 
     {
       VolatileBufferPtr<char> ptr2(buf);
+      if (ptr2.WasBufferPurged()) {
+        fail("Failed to Lock buffer again while currently locked");
+        return 1;
+      }
 
-      EXPECT_FALSE(ptr.WasBufferPurged())
-        << "Failed to lock buffer again while currently locked";
-      ASSERT_TRUE(ptr2) << "Didn't get a pointer on the second lock";
+      if (!ptr2) {
+        fail("Didn't get a pointer on the second lock");
+        return 1;
+      }
 
       strcpy(ptr2, teststr);
     }
   }
 
   {
     VolatileBufferPtr<char> ptr(buf);
+    if (ptr.WasBufferPurged()) {
+      fail("Buffer was immediately purged after unlock");
+      return 1;
+    }
 
-    EXPECT_FALSE(ptr.WasBufferPurged())
-      << "Buffer was immediately purged after unlock";
-    EXPECT_STREQ(ptr, teststr) << "Buffer failed to retain data after unlock";
+    if (strcmp(ptr, teststr)) {
+      fail("Buffer failed to retain data after unlock");
+      return 1;
+    }
   }
 
   // Test purging if we know how to
 #if defined(MOZ_WIDGET_GONK)
   // This also works on Android, but we need root.
   int fd = open("/" ASHMEM_NAME_DEF, O_RDWR);
-
-  ASSERT_GE(fd, 0) << "Failed to open ashmem device";
-  ASSERT_GE(ioctl(fd, ASHMEM_PURGE_ALL_CACHES, NULL), 0)
-    << "Failed to purge ashmem caches";
+  if (fd < 0) {
+    fail("Failed to open ashmem device");
+    return 1;
+  }
+  if (ioctl(fd, ASHMEM_PURGE_ALL_CACHES, NULL) < 0) {
+    fail("Failed to purge ashmem caches");
+    return 1;
+  }
 #elif defined(XP_DARWIN)
   int state;
   vm_purgable_control(mach_task_self(), (vm_address_t)NULL,
                       VM_PURGABLE_PURGE_ALL, &state);
 #else
-  return;
+  return 0;
 #endif
 
-  EXPECT_GT(buf->NonHeapSizeOfExcludingThis(), 0ul)
-    << "Buffer should not be allocated on heap";
-
-  {
-    VolatileBufferPtr<char> ptr(buf);
-
-    EXPECT_TRUE(ptr.WasBufferPurged())
-      << "Buffer should not be unpurged after forced purge";
-    EXPECT_STRNE(ptr, teststr) << "Purge did not actually purge data";
+  if (!buf->NonHeapSizeOfExcludingThis()) {
+    fail("Buffer should not be allocated on heap");
+    return 1;
   }
 
   {
     VolatileBufferPtr<char> ptr(buf);
+    if (!ptr.WasBufferPurged()) {
+      fail("Buffer should not be unpurged after forced purge");
+      return 1;
+    }
 
-    EXPECT_FALSE(ptr.WasBufferPurged()) << "Buffer still purged after lock";
+    if (!strcmp(ptr, teststr)) {
+      fail("Purge did not actually purge data");
+      return 1;
+    }
   }
+
+  {
+    VolatileBufferPtr<char> ptr(buf);
+    if (ptr.WasBufferPurged()) {
+      fail("Buffer still purged after lock");
+      return 1;
+    }
+  }
+
+  return 0;
 }
rename from memory/volatile/tests/moz.build
rename to memory/mozalloc/tests/moz.build
--- a/memory/volatile/tests/moz.build
+++ b/memory/mozalloc/tests/moz.build
@@ -1,13 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-UNIFIED_SOURCES = [
-    'TestVolatileBuffer.cpp',
-]
-
-FINAL_LIBRARY = 'xul-gtest'
-
-FAIL_ON_WARNINGS = True
+GeckoCppUnitTests([
+    'TestVolatileBuffer',
+])
deleted file mode 100644
--- a/memory/volatile/moz.build
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-NO_VISIBILITY_FLAGS = True
-
-EXPORTS.mozilla += [
-    'VolatileBuffer.h',
-]
-
-if CONFIG['OS_TARGET'] == 'Android':
-    UNIFIED_SOURCES += [
-        'VolatileBufferAshmem.cpp',
-    ]
-elif CONFIG['OS_TARGET'] == 'Darwin':
-    UNIFIED_SOURCES += [
-        'VolatileBufferOSX.cpp',
-    ]
-elif CONFIG['OS_TARGET'] == 'WINNT':
-    UNIFIED_SOURCES += [
-        'VolatileBufferWindows.cpp',
-    ]
-else:
-    UNIFIED_SOURCES += [
-        'VolatileBufferFallback.cpp',
-    ]
-
-FINAL_LIBRARY = 'xul'
-
-TEST_DIRS += ['tests']
-
-FAIL_ON_WARNINGS = True
--- a/moz.build
+++ b/moz.build
@@ -39,17 +39,16 @@ if not CONFIG['LIBXUL_SDK']:
             DIRS += ['other-licenses/android']
 
         if CONFIG['MOZ_MEMORY']:
             DIRS += ['memory']
 
         DIRS += [
             'mozglue',
             'memory/mozalloc',
-            'memory/volatile',
         ]
 
 if not CONFIG['JS_STANDALONE']:
     DIRS += ['xpcom/xpidl']
 
 if CONFIG['COMPILE_ENVIRONMENT'] and not CONFIG['LIBXUL_SDK']:
     DIRS += ['config/external/nspr']