diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-02-09 18:26:09 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-09 18:26:09 +0000 |
commit | 3f8ee5e6b4e42fc77b4716b23ccd00840e24e250 (patch) | |
tree | 16406801eae8da64bbe44a1b014a3b3945c22bd6 /fxjs/cfx_v8.h | |
parent | 026717cb667cf0c7215cf55daf794d69752fc900 (diff) | |
download | pdfium-3f8ee5e6b4e42fc77b4716b23ccd00840e24e250.tar.xz |
Move CFX_V8 testing from embeddertest to unittest.
Test the lowest layer without firing up the whole library. Requires
firing up v8 in the unit test main, though.
Move array buffer allocator to cfx_v8 to allow building isolates.
Change-Id: I9a56d503a48e0e555d3310f2997fa12137695860
Reviewed-on: https://pdfium-review.googlesource.com/26130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfx_v8.h')
-rw-r--r-- | fxjs/cfx_v8.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fxjs/cfx_v8.h b/fxjs/cfx_v8.h index 2f9794c243..08a18935ea 100644 --- a/fxjs/cfx_v8.h +++ b/fxjs/cfx_v8.h @@ -65,4 +65,11 @@ class CFX_V8 { v8::Isolate* m_isolate; }; +class CFX_V8ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { + static const size_t kMaxAllowedBytes = 0x10000000; + void* Allocate(size_t length) override; + void* AllocateUninitialized(size_t length) override; + void Free(void* data, size_t length) override; +}; + #endif // FXJS_CFX_V8_H_ |