Chromium Code Reviews| Index: Source/bindings/core/v8/V8BindingMacros.h |
| diff --git a/Source/bindings/core/v8/V8BindingMacros.h b/Source/bindings/core/v8/V8BindingMacros.h |
| index 2377e9d0c1445e71a67a83ba53490c01fedf4887..e30c3f7598d1aeec6586294194802277b5198aad 100644 |
| --- a/Source/bindings/core/v8/V8BindingMacros.h |
| +++ b/Source/bindings/core/v8/V8BindingMacros.h |
| @@ -46,6 +46,14 @@ namespace blink { |
| if (UNLIKELY(!var.prepare())) \ |
| return retVal; |
| +// Checks for a given v8::Value (value) whether it is an ArrayBufferView and |
| +// below a certain size limit. If below the limit allocates memory on the stack |
|
Hannes Payer (out of office)
2015/07/31 07:01:00
If below the limit memory is allocated on...
Michael Lippautz
2015/07/31 07:53:38
Done.
|
| +// to hold the actual payload. Keep the limit in sync with V8's |
| +// typed_array_max_size. |
| +#define allocateFlexibleArrayBufferViewStorage(value) \ |
| + (value->IsArrayBufferView() && (value.As<v8::ArrayBufferView>()->ByteLength() <= 64) ? \ |
| + alloca(value.As<v8::ArrayBufferView>()->ByteLength()) : nullptr) |
| + |
| template <typename T> |
| inline bool v8Call(v8::Maybe<T> maybe, T& outVariable) |
| { |