Reland "Use V8 implementation of ArrayBuffer in Blink". 

This is exactly the same patch as in https://codereview.chromium.org/18233012/. 

It got reverted from Blink because it failed ExtensionWebRequestApiTest.PostData2 
in chromium browser_test. The problem with that test has been identified 
(http://crbug.com/257128), the test will be disabled before the Blink roll and 
updated afterwards.

[email protected],[email protected]
BUG=257123,257122

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=153595

Review URL: https://chromiumcodereview.appspot.com/18503008

git-svn-id: svn://svn.chromium.org/blink/trunk@153624 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/third_party/WebKit/Source/wtf/ArrayBufferContents.h b/third_party/WebKit/Source/wtf/ArrayBufferContents.h
index 8d5b865..985cf90 100644
--- a/third_party/WebKit/Source/wtf/ArrayBufferContents.h
+++ b/third_party/WebKit/Source/wtf/ArrayBufferContents.h
@@ -44,6 +44,11 @@
     ArrayBufferContents();
     ArrayBufferContents(unsigned numElements, unsigned elementByteSize, ArrayBufferContents::InitializationPolicy);
 
+    // Use with care. data must be allocated with allocateMemory.
+    // ArrayBufferContents will take ownership of the data and free it (using freeMemorY)
+    // upon destruction.
+    ArrayBufferContents(void* data, unsigned sizeInBytes);
+
     ~ArrayBufferContents();
 
     void clear();
@@ -56,6 +61,9 @@
 
     void transfer(ArrayBufferContents& other);
 
+    static bool allocateMemory(size_t, InitializationPolicy, void*& data);
+    static void freeMemory(void* data);
+
 private:
     void* m_data;
     unsigned m_sizeInBytes;