Index: samples/shell.cc |
diff --git a/samples/shell.cc b/samples/shell.cc |
index 72aca0ff563ca865c37fc4d21c9486fecfab487d..222eeda1149406eea9206e54746fbd498a41829f 100644 |
--- a/samples/shell.cc |
+++ b/samples/shell.cc |
@@ -466,6 +466,10 @@ v8::Handle<v8::Value> CreateExternalArray(const v8::Arguments& args, |
v8::Persistent<v8::Object>::New(array); |
persistent_array.MakeWeak(data, ExternalArrayWeakCallback); |
array->SetIndexedPropertiesToExternalArrayData(data, type, length); |
+ array->Set(v8::String::New("length"), v8::Int32::New(length), |
+ v8::ReadOnly); |
+ array->Set(v8::String::New("BYTES_PER_ELEMENT"), |
+ v8::Int32::New(element_size)); |
return array; |
} |