summaryrefslogtreecommitdiffstats
path: root/gin/per_isolate_data.h
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-20 08:24:04 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-20 08:24:04 +0000
commit73dcce9f7bb7c309baa7032183772b8fd554db7d (patch)
tree1efbeffecce74feb4ef9e74be9f00e143aefb623 /gin/per_isolate_data.h
parent13d954df9638ae453e2b180e7aa3feffa5da768b (diff)
downloadchromium_src-73dcce9f7bb7c309baa7032183772b8fd554db7d.zip
chromium_src-73dcce9f7bb7c309baa7032183772b8fd554db7d.tar.gz
chromium_src-73dcce9f7bb7c309baa7032183772b8fd554db7d.tar.bz2
gin: Make it possible to use gin array buffers when running on top of blink
This approach won't let use share an array buffer with blink, however, it's good enough for a mojo js app. For gin::Wrappable objects that want to interact with blink APIs, they need to provide a custom converter to and from WebArrayBuffer(View) BUG=none R=abarth@chromium.org, dslomov@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/172133002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gin/per_isolate_data.h')
-rw-r--r--gin/per_isolate_data.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gin/per_isolate_data.h b/gin/per_isolate_data.h
index ed93545..18c230b 100644
--- a/gin/per_isolate_data.h
+++ b/gin/per_isolate_data.h
@@ -18,7 +18,7 @@ namespace gin {
// class stores all the Gin-related data that varies per isolate.
class GIN_EXPORT PerIsolateData {
public:
- explicit PerIsolateData(v8::Isolate* isolate);
+ PerIsolateData(v8::Isolate* isolate, v8::ArrayBuffer::Allocator* allocator);
~PerIsolateData();
static PerIsolateData* From(v8::Isolate* isolate);
@@ -39,6 +39,7 @@ class GIN_EXPORT PerIsolateData {
v8::Local<v8::FunctionTemplate> GetFunctionTemplate(WrapperInfo* info);
v8::Isolate* isolate() { return isolate_; }
+ v8::ArrayBuffer::Allocator* allocator() { return allocator_; }
private:
typedef std::map<
@@ -49,6 +50,7 @@ class GIN_EXPORT PerIsolateData {
// PerIsolateData doesn't actually own |isolate_|. Instead, the isolate is
// owned by the IsolateHolder, which also owns the PerIsolateData.
v8::Isolate* isolate_;
+ v8::ArrayBuffer::Allocator* allocator_;
ObjectTemplateMap object_templates_;
FunctionTemplateMap function_templates_;