let4be
let4be

Reputation: 1081

v8 proxy ReferenceError

I'm trying to use ES6 Proxy in v8 (version 4.6.85.31) but I'm getting ReferenceError: Proxy is not defined (I'm using v8 from golang)

I also tried the same in node.js 5.1.0 with --harmony-proxies flag and it supports proxies(same v8 version)

But how can I use proxies directly in v8? do I need to compile it with some flags?

Thanks!

Upvotes: 5

Views: 391

Answers (1)

let4be
let4be

Reputation: 1081

For those who got the same question, you can use

std::string flags("--harmony_proxies");
V8::SetFlagsFromString(flags.c_str(), flags.length());

Also see node --v8-options for complete list of v8 options, lot's of fun stuff!

for example I also needed --expose_gc flag to debug v8 garbage collection

Upvotes: 7

Related Questions