Thank you for the quick reply!
Filed a bug: https://code.google.com/p/v8/issues/detail?id=3588


2014-09-22 15:59 GMT+09:00 Sven Panne <[email protected]>:

> 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? :-)
>
> I see.


> If you are really in a hurry, perhaps injecting some "use strict" before
> the actual code might work, too. (?)
>
Yeah, probably we will do that as interim solution.

>  --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-users/njXnLxmTKeo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
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