Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 2719883004: Adds support for ArrayBufferContents with external buffer. (Closed)
Patch Set: renames ScopedData -> DataHandle Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
index 687d1d0ecf39e8dd826c7680eb4e3fddaa2eb9b8..015928596b1bb5328d9d7c3de457b503d51006d9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -389,21 +389,17 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
// should respond by throwing a RangeError, per
// http://www.ecma-international.org/ecma-262/6.0/#sec-createbytedatablock.
void* Allocate(size_t size) override {
- void* data;
- WTF::ArrayBufferContents::allocateMemoryOrNull(
- size, WTF::ArrayBufferContents::ZeroInitialize, data);
- return data;
+ return WTF::ArrayBufferContents::allocateMemoryOrNull(
+ size, WTF::ArrayBufferContents::ZeroInitialize);
}
void* AllocateUninitialized(size_t size) override {
- void* data;
- WTF::ArrayBufferContents::allocateMemoryOrNull(
- size, WTF::ArrayBufferContents::DontInitialize, data);
- return data;
+ return WTF::ArrayBufferContents::allocateMemoryOrNull(
+ size, WTF::ArrayBufferContents::DontInitialize);
}
void Free(void* data, size_t size) override {
- WTF::ArrayBufferContents::freeMemory(data, size);
+ WTF::ArrayBufferContents::freeMemory(data);
}
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698