Re: [v8-users] Re: Why env1 can't access the env2 global variables

2014-11-13 Thread Louis Santillan
My inclination is that your v8::Isolate::GetCurrent() call in v8_str is the culprit. So while you created two contexts, you used one isolate. On Thu, Nov 13, 2014 at 8:00 PM, Tom Fan wrote: > Context::Scope don't destroy context, it just help you enter/exit context > when code enter/leave c++ sc

[v8-users] Re: Why env1 can't access the env2 global variables

2014-11-13 Thread Tom Fan
Context::Scope don't destroy context, it just help you enter/exit context when code enter/leave c++ scope automatically. I wanna env1 and evn2 share global object, but i can't access evn1's global variable p which i set it at evn1 before. On Friday, November 14, 2014 11:45:52 AM UTC+8, Flying

[v8-users] Re: Why env1 can't access the env2 global variables

2014-11-13 Thread Flying Jester
It looks really suspicious to me that you are creating contexts and context scopes and then immediately destroying them like that. For what you are doing, you need at most one context scope and one context. Create them at the very beginning, and destroy them at the very end. On Thursday, Nove

[v8-users] Named property handler as fallback only

2014-11-13 Thread Avery Fay
Is there a way to use SetNamedPropertyHandler on an ObjectTemplate such that Object's created using the template will first check for explicitly set properties before falling back to the handler? if not, is there a workaround that doesn't involve creating a key/value data structure as part of the

Re: [v8-users] Re: Intent to Implement ES6 Template Literals

2014-11-13 Thread 'Erik Arvidsson' via v8-users
FWIW, IE11 developer preview does cache the call site object. It seems to do so based on location in the source. Two identical call sites leads to two objects. Two evals leads to same call site object. On Fri, Nov 7, 2014 at 11:51 AM, 'Andreas Rossberg' via v8-users < v8-users@googlegroups.com> wr

[v8-users] Why env1 can't access the env2 global variables

2014-11-13 Thread Tom Fan
This is my source code, i set env2 global to evn1 global, but result is "v = undefined". #include using namespace v8; static inline v8::Local v8_str(const char* x) { return v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), x); } static inline v8::Local CompileRun(const char* source) {

[v8-users] Read interceptor firing on write access

2014-11-13 Thread Danny Dorfman
Hello there, I am trying to write a piece of code that use interceptors, and I have the following issue: whenever a I try to* set* a variable, I get first the setter callback, but then the getter callback as well. The stack looks a bit like this: #0 xxx::GetProperty (property=..., info=...) at