Chromium Code Reviews| Index: src/factory.h |
| diff --git a/src/factory.h b/src/factory.h |
| index 6a64e93f7d44431090614267ba7ef1d92e20bd3d..68845d21cca265d53e4d6ad047c468372a0a9ef3 100644 |
| --- a/src/factory.h |
| +++ b/src/factory.h |
| @@ -333,6 +333,13 @@ class V8_EXPORT_PRIVATE Factory final { |
| Handle<ByteArray> NewByteArray(int length, |
| PretenureFlag pretenure = NOT_TENURED); |
| + template <class T> |
| + Handle<PodArray<T>> NewPodArray(int length, |
|
Michael Starzinger
2016/11/03 12:41:44
How would you call about not adding a new factory
|
| + PretenureFlag pretenure = NOT_TENURED) { |
| + return Handle<PodArray<T>>::cast( |
| + NewByteArray(length * sizeof(T), pretenure)); |
| + } |
| + |
| Handle<BytecodeArray> NewBytecodeArray(int length, const byte* raw_bytecodes, |
| int frame_size, int parameter_count, |
| Handle<FixedArray> constant_pool); |