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

Unified Diff: third_party/WebKit/Source/core/dom/DOMArrayBuffer.h

Issue 2826263002: Make DOMArrayBuffer::Transfer neuter v8::ArrayBuffers (Closed)
Patch Set: add test and use to_transfer Created 3 years, 8 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
Index: third_party/WebKit/Source/core/dom/DOMArrayBuffer.h
diff --git a/third_party/WebKit/Source/core/dom/DOMArrayBuffer.h b/third_party/WebKit/Source/core/dom/DOMArrayBuffer.h
index 584eca4fde90d80a9e0083e2d518d6024d96430d..7da0234667b3b4ad3ebb6b6842442242b312a6ca 100644
--- a/third_party/WebKit/Source/core/dom/DOMArrayBuffer.h
+++ b/third_party/WebKit/Source/core/dom/DOMArrayBuffer.h
@@ -41,6 +41,12 @@ class CORE_EXPORT DOMArrayBuffer final : public DOMArrayBufferBase {
return Create(Buffer()->Slice(begin));
}
+ bool IsNeuterable(v8::Isolate*);
+
+ // Transfer the ArrayBuffer if it is neuterable, otherwise make a copy and
+ // transfer that.
+ bool Transfer(v8::Isolate*, WTF::ArrayBufferContents& result);
+
v8::Local<v8::Object> Wrap(v8::Isolate*,
v8::Local<v8::Object> creation_context) override;

Powered by Google App Engine
This is Rietveld 408576698