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

Unified Diff: Source/bindings/core/v8/V8BindingMacros.h

Issue 1091543002: IDL: Add [FlexibleArrayBufferView] and use for bufferSubData Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-includes-for-type-tuning
Patch Set: add warning about the storage's life-time Created 5 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
« no previous file with comments | « Source/bindings/core/v8/V8Binding.cpp ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8BindingMacros.h
diff --git a/Source/bindings/core/v8/V8BindingMacros.h b/Source/bindings/core/v8/V8BindingMacros.h
index 5fece1e5d4c27845c6d2f4fc212bf82925dd7779..66639c5bba6cf10fa039796b8f006649ef4d7c58 100644
--- a/Source/bindings/core/v8/V8BindingMacros.h
+++ b/Source/bindings/core/v8/V8BindingMacros.h
@@ -77,6 +77,9 @@ namespace blink {
if (UNLIKELY(!var.prepare())) \
return retVal;
+#define SMALL_ARRAY_BUFFER_VIEW_STORAGE(value) \
+ (value->IsArrayBufferView() && !value.As<v8::ArrayBufferView>()->HasBuffer() ? alloca(value.As<v8::ArrayBufferView>()->ByteLength()) : nullptr)
+
template <typename T>
inline bool v8Call(v8::Maybe<T> maybe, T& outVariable)
{
« no previous file with comments | « Source/bindings/core/v8/V8Binding.cpp ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698