Revision: 16032
Author:   [email protected]
Date:     Fri Aug  2 05:56:53 2013
Log: Revert "Add size_t length argument to v8::ArrayBuffer::Allocator::Free."

This reverts r16031 for breaking shared build.

[email protected]

Review URL: https://codereview.chromium.org/21818003
http://code.google.com/p/v8/source/detail?r=16032

Modified:
 /branches/bleeding_edge/include/v8.h
 /branches/bleeding_edge/src/api.cc
 /branches/bleeding_edge/src/d8.cc
 /branches/bleeding_edge/src/runtime.cc
 /branches/bleeding_edge/test/cctest/cctest.cc

=======================================
--- /branches/bleeding_edge/include/v8.h        Fri Aug  2 05:19:22 2013
+++ /branches/bleeding_edge/include/v8.h        Fri Aug  2 05:56:53 2013
@@ -2425,20 +2425,10 @@
     }

     /**
-     * Free the memory block of size |length|, pointed to by |data|.
-     * That memory is guaranteed to be previously allocated by |Allocate|.
-     */
-    virtual void Free(void* data, size_t length) {
-      // Override with call to |Free(void*)| for compatibility
-      // with legacy version.
-      Free(data);
-    }
-
-    /**
-     * Deprecated. Never called directly by V8.
-     * For compatibility with legacy version of this interface.
+     * Free the memory pointed to |data|. That memory is guaranteed to be
+     * previously allocated by |Allocate|.
      */
-    virtual void Free(void* data);
+    virtual void Free(void* data) = 0;
   };

   /**
=======================================
--- /branches/bleeding_edge/src/api.cc  Fri Aug  2 05:19:22 2013
+++ /branches/bleeding_edge/src/api.cc  Fri Aug  2 05:56:53 2013
@@ -3069,12 +3069,6 @@
            "v8::ArrayBuffer::Cast()",
            "Could not convert to ArrayBuffer");
 }
-
-
-void v8::ArrayBuffer::Allocator::Free(void* data) {
-  API_Fatal("v8::ArrayBuffer::Allocator::Free",
-            "Override Allocator::Free(void*, size_t)");
-}


 void v8::ArrayBufferView::CheckCast(Value* that) {
=======================================
--- /branches/bleeding_edge/src/d8.cc   Fri Aug  2 05:19:22 2013
+++ /branches/bleeding_edge/src/d8.cc   Fri Aug  2 05:56:53 2013
@@ -1635,9 +1635,7 @@
   virtual void* AllocateUninitialized(size_t length) {
     return malloc(length);
   }
-  virtual void Free(void* data, size_t) { free(data); }
-  // TODO(dslomov): Remove when v8:2823 is fixed.
-  virtual void Free(void* data) { UNREACHABLE(); }
+  virtual void Free(void* data) { free(data); }
 };


=======================================
--- /branches/bleeding_edge/src/runtime.cc      Fri Aug  2 05:19:22 2013
+++ /branches/bleeding_edge/src/runtime.cc      Fri Aug  2 05:56:53 2013
@@ -689,9 +689,7 @@
   isolate->heap()->AdjustAmountOfExternalAllocatedMemory(
       -static_cast<intptr_t>(allocated_length));
   CHECK(V8::ArrayBufferAllocator() != NULL);
-  V8::ArrayBufferAllocator()->Free(
-      phantom_array_buffer->backing_store(),
-      allocated_length);
+  V8::ArrayBufferAllocator()->Free(phantom_array_buffer->backing_store());
 }


=======================================
--- /branches/bleeding_edge/test/cctest/cctest.cc       Fri Aug  2 05:19:22 2013
+++ /branches/bleeding_edge/test/cctest/cctest.cc       Fri Aug  2 05:56:53 2013
@@ -99,10 +99,9 @@


 class CcTestArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
+ public:
   virtual void* Allocate(size_t length) { return malloc(length); }
-  virtual void Free(void* data, size_t length) { free(data); }
-  // TODO(dslomov): Remove when v8:2823 is fixed.
-  virtual void Free(void* data) { UNREACHABLE(); }
+  virtual void Free(void* data) { free(data); }
 };


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to