Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 700
let4be Avatar asked Dec 23 '15 16:12

let4be


1 Answers

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

like image 185
let4be Avatar answered Oct 05 '22 03:10

let4be