Index: samples/shell.cc |
diff --git a/samples/shell.cc b/samples/shell.cc |
index 222eeda1149406eea9206e54746fbd498a41829f..51053aa0e56233553dc0da8571da67f03a23615d 100644 |
--- a/samples/shell.cc |
+++ b/samples/shell.cc |
@@ -72,6 +72,7 @@ v8::Handle<v8::Value> Uint16Array(const v8::Arguments& args); |
v8::Handle<v8::Value> Int32Array(const v8::Arguments& args); |
v8::Handle<v8::Value> Uint32Array(const v8::Arguments& args); |
v8::Handle<v8::Value> Float32Array(const v8::Arguments& args); |
+v8::Handle<v8::Value> Float64Array(const v8::Arguments& args); |
v8::Handle<v8::Value> PixelArray(const v8::Arguments& args); |
v8::Handle<v8::String> ReadFile(const char* name); |
void ReportException(v8::TryCatch* handler); |
@@ -359,6 +360,8 @@ v8::Persistent<v8::Context> CreateShellContext() { |
v8::FunctionTemplate::New(Uint32Array)); |
global->Set(v8::String::New("Float32Array"), |
v8::FunctionTemplate::New(Float32Array)); |
+ global->Set(v8::String::New("Float64Array"), |
+ v8::FunctionTemplate::New(Float64Array)); |
global->Set(v8::String::New("PixelArray"), |
v8::FunctionTemplate::New(PixelArray)); |
@@ -512,6 +515,12 @@ v8::Handle<v8::Value> Float32Array(const v8::Arguments& args) { |
} |
+v8::Handle<v8::Value> Float64Array(const v8::Arguments& args) { |
+ return CreateExternalArray(args, v8::kExternalDoubleArray, |
+ sizeof(double)); // NOLINT |
+} |
+ |
+ |
v8::Handle<v8::Value> PixelArray(const v8::Arguments& args) { |
return CreateExternalArray(args, v8::kExternalPixelArray, sizeof(uint8_t)); |
} |