On Fri, May 24, 2013 at 12:32 AM, Michael Wielpütz <[email protected]> wrote: > Hi, > > currently I'm trying to read an ArrayBuffer, resulting from Javascript, > inside a C++ application. For testing purposes I stripped the code down to > the following: > > v8::Isolate* isolate = v8::Isolate::GetCurrent(); > v8::Local<v8::Context> context = v8::Context::New(isolate); > v8::Context::Scope contextScope(context); > > // the mini "script" > v8::Handle<v8::String> source = v8::String::New("new ArrayBuffer(3)"); > v8::Handle<v8::Script> script = v8::Script::Compile(source); > > v8::TryCatch trycatch; > v8::Handle<v8::Value> result = script->Run(); > > if (result.IsEmpty()) > { > v8::Handle<v8::Value> excep = trycatch.Exception(); > v8::String::AsciiValue excepStr(excep); > BOOST_REQUIRE_MESSAGE(false, *excepStr); > } > > The result variable is always empty and I receive the following message: > ReferenceError: ArrayBuffer is not defined > > If I replace the line > v8::Handle<v8::String> source = v8::String::New("new ArrayBuffer(3)"); > by > v8::Handle<v8::String> source = v8::String::New("new Array(3)"); > the result variable holds the correct value. > > Any ideas what I'm doing wrong here? > > Thanks in advance, > > Michael
Add --harmony_typed_arrays, they're not exposed by default. -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
