On Mon, Sep 22, 2014 at 8:16 AM, <[email protected]> wrote:

> [...] V8 has "--use_strict" command line flag which enables strict mode
> globally, but we want to enforce strict mode only on worker scripts. Is
> there any way to achieve this?
>

Currently, no: All our flags are global variables, and the web workers live
in the same process as the "normal" v8 Isolate, so all share the same set
of flags.


>  Or, would it need a change such as adding an option parameter to
> ScriptCompiler::Compile()? [...]
>

Instead of hacking an ad-hoc parameter into that API entry, we should make
our global flags an object which gets passed to Isolate::New. This would
not be hard, but quite some (mechanical) work. Any takers? :-)

If you are really in a hurry, perhaps injecting some "use strict" before
the actual code might work, too. (?)

-- 
-- 
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/d/optout.

Reply via email to