Re: [v8-users] Re: [v8-team] [v8-status-updates] Intent to ship: module namespace exports

2018-10-15 Thread Jochen Eisinger
v8-status-updates to BCC

Please don't mix internal and external mailing lists

Sathya Gunasekaran  schrieb am Mo., 15. Okt. 2018,
06:22:

> LGTM
> On Mon, Oct 15, 2018 at 2:58 PM Georg Neis  wrote:
> >
> > Summary
> > This feature extends the existing syntax for module exports by the form
> >   export * as foo from "bar"
> > which is the analogue to the existing form
> >   import * as foo from "bar"
> > It is equivalent to
> >   import * as _foo from "bar"; export {_foo as foo}
> > except that it does not introduce a local name (here _foo).
> >
> > Specification
> > https://github.com/tc39/ecma262/pull/1174
> >
> > Contact
> > n...@chromium.org
> >
> > Chrome status entry
> > https://www.chromestatus.com/feature/6439734029058048
> >
> > V8 tracking bug
> > https://bugs.chromium.org/p/v8/issues/detail?id=8101
> >
> > Interoperability and compatibility risk
> > No risks as this is new syntax that results in a syntax error when not
> supported.
> >
> > Is this feature fully tested?
> > Yes, by own (V8) tests as well as Test262 tests.
> >
> > Requesting approval to ship?
> > Yes. Note that since this is a V8/JS feature, this post is just an FYI
> to blink-dev — no signoff from Blink API owners is required.
> >
> > --
> > Georg Neis
> > Software Engineer
> >
> > Google Germany GmbH
> > Erika-Mann-Straße 33
> > 80636 München
> >
> > Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
> > Registergericht und -nummer: Hamburg, HRB 86891
> > Sitz der Gesellschaft: Hamburg
> >
> > Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten
> haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
> löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
> dass die E-Mail an die falsche Person gesendet wurde.
> >
> > This e-mail is confidential. If you received this communication by
> mistake, please don't forward it to anyone else, please erase all copies
> and attachments, and please let me know that it has gone to the wrong
> person.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "V8 status emails and design docs" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to v8-status-updates+unsubscr...@google.com.
> > To post to this group, send email to v8-status-upda...@google.com.
> > To view this discussion on the web visit
> https://groups.google.com/a/google.com/d/msgid/v8-status-updates/CABT__oFbT23Qh0g9idTfox5_bHr1gDUepYW134yv9iTS4RUubw%40mail.gmail.com
> .
> >
> > --
> > v8-team mailing list
> > v8-t...@google.com
> > https://groups.google.com/a/google.com/group/v8-team
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [blink-dev] Re: [v8-users] Intent to Ship: Optional catch binding

2018-01-26 Thread Jochen Eisinger
I thought V8 wanted to use the blink process nowadays?

On Thu, Jan 18, 2018 at 10:32 PM Adam Klein  wrote:

> LGTM!
>
> Note that this is a v8/JavaScript feature, so this is just an FYI for
> blink-dev at the moment.
>
> On Thu, Jan 18, 2018 at 12:19 PM, Sathya Gunasekaran  > wrote:
>
>> Contact Emails:
>> gsat...@chromium.org
>> bak...@gmail.com
>>
>> Spec:
>> https://tc39.github.io/proposal-optional-catch-binding/
>>
>> Summary:
>> This proposal allows developers to use try/catch without creating an
>> unused binding.
>>
>> Interoperability and Compatibility Risk:
>> This is a stage3 feature. Previously not having a binding was an error,
>> so there's no compat risk.
>>
>> Firefox 58 Beta and Safari Tech Preview 37 ship this feature. Edge has
>> not implemented this yet.
>>
>> V8 tests as well as test262 tests pass.
>>
>> Tracking bug:
>> https://bugs.chromium.org/p/v8/issues/detail?id=6889
>>
>> Chromestatus entry:
>> https://www.chromestatus.com/features/5810795665424384
>>
>> --
>> --
>> v8-users mailing list
>> v8-users@googlegroups.com
>> 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 v8-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "blink-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAEvLGcJL74s7xeQLU%2BMC3MCYoUnyKzSLGF5-Jhbo5%2BJj9i%2B3iQ%40mail.gmail.com
> 
> .
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Adding Signature to my FunctionTemplate but "derived types" calling functions get Illegal Invocation errors

2017-05-29 Thread Jochen Eisinger
I recently updated the documentation for Info.Holder() and Info.This() -
they only differ if you use a hidden prototype.

The comment on Signature you quoted is correct - your example code doesn't
use inheritance of the FunctionTemplate but JS inheritance.

On Mon, May 29, 2017 at 9:08 AM Zac Hansen <xax...@gmail.com> wrote:

> My understanding is that the signature picking out the object in the
> prototype chain was the difference between info.This and info.Holder.
> Mostly from reading the thread I linked previously.
>
> Also, this is from the doxygen docs for signature:
>
> > A receiver matches a given signature if the receiver (or any of its
> hidden prototypes) was created from the signature's FunctionTemplate
> <http://v8.paulfryzel.com/docs/master/classv8_1_1_function_template.html>,
> or from a FunctionTemplate
> <http://v8.paulfryzel.com/docs/master/classv8_1_1_function_template.html> that
> inherits directly or indirectly from the signature's FunctionTemplate
> <http://v8.paulfryzel.com/docs/master/classv8_1_1_function_template.html>.
>
>
> On Mon, May 29, 2017 at 12:01 AM, Zac Hansen <xax...@gmail.com> wrote:
>
>> In this thread:
>> https://groups.google.com/forum/#!topic/v8-users/Axf4hF_RfZo
>>
>> it says:
>>
>> > If your function has a signature that says that it must be called on a
>> particular type v8 will search the prototype chain for an object of
>> that type when the function is called.
>>
>>
>> Given my code, I don't understand why making an object that directly sets
>> its prototype as an object capable of calling a function with a signature
>> wouldn't be able to call that same function.
>>
>> Is that thread I linked wrong?   Or am I misunderstanding something?
>>
>> On Sun, May 28, 2017 at 11:57 PM, Jochen Eisinger <joc...@chromium.org>
>> wrote:
>>
>>> A signature requires the object either be constructed from the same
>>> FunctionTemplate (as e.g. new MyType() does), or from a FunctionTemplate
>>> that inherited from the signature's FunctionTemplate.
>>>
>>> Note however that the "info.Holder" would still point at the receiver,
>>> and not the prototype with the matching signature :/
>>>
>>> On Sun, May 28, 2017 at 7:27 PM Zac Hansen <xax...@gmail.com> wrote:
>>>
>>>> I create a "constructor" FunctionTemplate, create a signature from that
>>>> FunctionTemplate, then on that FunctionTemplate's PrototypeObject
>>>> ObjectTemplate, I create a bunch of FunctionTemplate's using the signature
>>>> I generated before.
>>>>
>>>> I can call the function with objects created directly from the
>>>> "constructor" FunctionTemplate.  But if I call it from an object with that
>>>> object in the prototype chain, it doesn't work.
>>>>
>>>> base = new MyType();
>>>> derived = Object.create(base);  // setting .__proto__ has the same
>>>> behavior
>>>>
>>>> base.some_native_function(); <== works
>>>>
>>>> derived.some_native_function(); <== TypeError: Illegal invocation
>>>>
>>>>
>>>>
>>>> Anyone know what I might be doing wrong?  If I remove the signature,
>>>> everything works fine, but then holder == this when calling with derived,
>>>> which isn't what I want.
>>>>
>>>> --Zac
>>>>
>>>> --
>>>> --
>>>> v8-users mailing list
>>>> v8-users@googlegroups.com
>>>> 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 v8-users+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> --
>>> v8-users mailing list
>>> v8-users@googlegroups.com
>>> 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/dR8oI0ZwzG0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> v8-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Adding Signature to my FunctionTemplate but "derived types" calling functions get Illegal Invocation errors

2017-05-29 Thread Jochen Eisinger
A signature requires the object either be constructed from the same
FunctionTemplate (as e.g. new MyType() does), or from a FunctionTemplate
that inherited from the signature's FunctionTemplate.

Note however that the "info.Holder" would still point at the receiver, and
not the prototype with the matching signature :/

On Sun, May 28, 2017 at 7:27 PM Zac Hansen  wrote:

> I create a "constructor" FunctionTemplate, create a signature from that
> FunctionTemplate, then on that FunctionTemplate's PrototypeObject
> ObjectTemplate, I create a bunch of FunctionTemplate's using the signature
> I generated before.
>
> I can call the function with objects created directly from the
> "constructor" FunctionTemplate.  But if I call it from an object with that
> object in the prototype chain, it doesn't work.
>
> base = new MyType();
> derived = Object.create(base);  // setting .__proto__ has the same behavior
>
> base.some_native_function(); <== works
>
> derived.some_native_function(); <== TypeError: Illegal invocation
>
>
>
> Anyone know what I might be doing wrong?  If I remove the signature,
> everything works fine, but then holder == this when calling with derived,
> which isn't what I want.
>
> --Zac
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Cryptic out-of-memory error

2017-05-11 Thread Jochen Eisinger
Thank you for the detailed bug report.

I tried reproducing this on the latest version of V8, but couldn't observe
the behavior you described.

Have you considered updating to at least the latest stable version of V8?

On Wed, May 10, 2017 at 7:50 PM Andre Cunha 
wrote:

> I've managed to reproduce the problem using just V8's hello_world example
> (source code attached). I just added a loop around the creation and
> destruction of the Isolate (this is what happens in each cycle of my stress
> test). When I run the process and monitor it in "top", the RES column stays
> constant at around 26 MB, but the VIRT column grows indefinitely; after
> about 7 minutes, the VIRT column reaches around 33 GB, and the process
> crashes (the value of "CommitLimit" in my machine, got from /proc/meminfo,
> is 35,511,816 kB).
>
> Following Michael's suggestion, I changed file src/heap/spaces.cc so that
> it prints a stack trace when it's about to return NULL. I'm also sending
> the stack trace attached. I use V8 5.6.326.42 in Fedora 25, x86_64.
>
> Just to explain why I'm doing this test: in the library I'm working on,
> the user can create a certain kind of thread and send requests to it. Each
> thread needs to run JS code (received from the user), so it creates its own
> Isolate when it needs to, and destroys it when the Isolate is no longer
> necessary. One of our stress tests involves the constant creation and
> destruction of such threads, as well as constantly sending requests to the
> same thread. It was in this context that I found this problem.
>
> On Monday, May 8, 2017 at 12:50:37 PM UTC-3, Andre Cunha wrote:
>>
>> @Michael Lippautz, I'll try adding a breakpoint if AllocateChunk returns
>> NULL; hopefully, I'll get more information about the problem.
>>
>> @Jakob Kummerow, yes, I'm calling Isolate::Dispose() in every isolate
>> after using it. I'll also observe the VIRT column and see if it shows any
>> abnormality.
>>
>> Thank you!
>>
>> On Monday, May 8, 2017 at 11:07:44 AM UTC-3, Jakob Kummerow wrote:
>>>
>>> My guess would be an address space leak (should show up in the "VIRT"
>>> column of "top" on Linux). Are you calling "isolate->Dispose()" on any
>>> isolate you're done with?
>>>
>>> On Mon, May 8, 2017 at 4:01 PM, Michael Lippautz 
>>> wrote:
>>>
 V8 usually fails there if it cannot allocate a 512KiB page from the
 operating system/

 You could try hooking in AllocateChunk [1] and see why it is returning
 NULL and trace back through the underlying calls.

 Best, Michael

 [1]:
 https://cs.chromium.org/chromium/src/v8/src/heap/spaces.cc?q=AllocateChunk=package:chromium=739

 On Mon, May 8, 2017 at 3:27 PM Andre Cunha 
 wrote:

> Hello,
>
> I have embedded v8 into a project for the company I work for, and
> during some stress tests, I've encountered a weird out-of-memory error.
> After considerable investigation, I still have no idea of what might be
> going on, so I'm reaching out to you in hope of some insight.
>
> So here is a summary of the scenario: in each test iteration, I create
> an Isolate, run some short JS code fragments, and then destroy the 
> isolate.
> After the execution of each code fragment, I perform some variable
> manipulations from my C++ code using V8's API, prior to running the next
> fragment. I repeat thousands of such iterations over the same input (it's
> valid), and I expect no memory leaks and no crashes. However, after about 
> 3
> hours, V8 crashes with an out-of-memory error of no apparent reason.
>
> I have run the code though valgrind and using address sanitizing, and
> no memory leaks were detected. Additionally, I monitor memory consumption
> throughout the test; the program's memory usage is stable, without any
> peak, and when V8 crashes the system has a lot of available memory (more
> than 5 Gib). I have used V8's API to get heap usage statistics after each
> successful iteration; the values are always the same, and are shown below
> (they are included in an attached file, typical_memory.txt):
>
> ScriptEngine::Run: finished running at 2017-05-05T13:20:34
>   used_heap_size   : 46.9189 Mib
>   total_heap_size  : 66.1562 Mib
>   Space 0
> name   : new_space
> size   : 8 Mib
> used_size  : 2.47314 Mib
> available_size : 5.39404 Mib
>   Space 1
> name   : old_space
> size   : 39.5625 Mib
> used_size  : 31.6393 Mib
> available_size : 5.51526 Mib
>   Space 2
> name   : code_space
> size   : 10.4375 Mib
> used_size  : 6.16919 Mib
> available_size : 0 B
>   Space 3
> name   : map_space
> 

Re: [v8-users] Re: Isolate Creation Times

2017-02-23 Thread Jochen Eisinger
Hey

That sounds odd. Could you file a bug at crbug.com/v8/new and provide the
gn args you used for building?

Thanks
Jochen

Brendan Bates  schrieb am Do., 23. Feb. 2017,
18:07:

> I should also note that I can replicate this by simply running the d8
> executable, which seems to take about 5 seconds to bootstrap.
>
>
> On Thursday, February 23, 2017 at 10:59:47 AM UTC-5, Brendan Bates wrote:
>
> I'm posting here to see if anyone has experienced this recently.
>
> We upgraded our scripting environment from *5.1.281.65 *to *5.7.492.44*.
> Everything as far as building with GN has gone
> smoothly, however one odd issue is with the timing of the isolate creation:
>
>
> _isolate = Isolate::New(createParams);
>
>
> This used to be nearly instantaneous (few ms at most), now it's taking
> about 5 seconds on my Windows 10 64-bit
> environment (with a 32-bit build).  The allocator in the createParams is
> using the default v8 allocator.  Will using an
> empty snapshop help?  If we have 20 scripts loaded, that's 100 seconds of
> startup time... way too much.  Any help
> would be appreciated.  Thanks!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Can not generate v8_version.lib on Windows

2017-02-09 Thread Jochen Eisinger
fix here: https://chromium-review.googlesource.com/c/440244/

On Wed, Feb 8, 2017 at 11:10 AM Dongbo  wrote:

> On windows, with gn args is_debug=false v8_static_library=true
> v8_use_external_startup_data=false
> I got the following error when building v8 via 'ninja -C xxx'
>
> C:\Reference\v8\v8>ninja -C out/x64.release
> ninja: Entering directory `out/x64.release'
> [3/429] LINK mksnapshot.exe mksnapshot.exe.pdb
> FAILED: mksnapshot.exe mksnapshot.exe.pdb
> C:/Reference/depot_tools/python276_bin/python.exe
> ../../build/toolchain/win/tool
> _wrapper.py link-wrapper environment.x64 False link.exe /nologo
> /OUT:./mksnapsho
> t.exe /PDB:./mksnapshot.exe.pdb @./mksnapshot.exe.rsp
> LINK : fatal error LNK1181: cannot open input file 'obj/v8_version.lib'
> ninja: build stopped: subcommand failed.
>
> Then I tried to build v8_version.lib independently:
>
> C:\Reference\v8\v8>ninja -C out/x64.release v8_version
> ninja: Entering directory `out/x64.release'
> [1/1] LIB obj/v8_version.lib
>
> Oddly, nothing was created. ??
>
> Anybody encountered a similar problem?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] v8 linker issues for android build on Mac

2017-01-26 Thread Jochen Eisinger
it's blocked on the NDK we download not supporting Darwin, and that's a bit
outside of my scope to change myself, so no idea when it'll be available

On Wed, Jan 25, 2017 at 2:22 PM Mindy DelliCarpini <mindyde...@gmail.com>
wrote:

> Thoughts on when it might be supported?
>
> Or any prebuilts? I know you had been submitting patches in December to
> move this forward
>
> On Wed, Jan 25, 2017 at 5:04 AM, Jochen Eisinger <joc...@chromium.org>
> wrote:
>
> Using gn to build for android on mac is not yet supported, sorry (and I
> realize that the make based version is also no longer supported...) sorry
> about that :/
>
> On Wed, Jan 25, 2017 at 2:08 AM Mindy DelliCarpini <mindyde...@gmail.com>
> wrote:
>
>
>
> I built libv8_base, libv8_libbase,  these as full static libraries:
>
>
> args.gn:
>
> is_debug = false
>
> target_cpu = "arm"
>
> v8_target_cpu = "arm"
>
> target_os="android"
>
> v8_static_library = true
>
>
> Errors:
>
> ...android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
> error: jni/libpng.a: no archive symbol table (run ranlib)
>
>
> ...android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
> error: jni/libv8_libbase.a: no archive symbol table (run ranlib)
>
>
> ...android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
> error: jni/libv8_libplatform.a: no archive symbol table (run ranlib)
>
>
> Follow by a bunch of unsatisfied linker errors:
>
>
> jni/BoomListPackagesAndroid.cpp:124: error: undefined reference to
> 'v8::Object::Set(v8::Local, v8::Local)'
>
> jni/BoomListPackagesAndroid.cpp:125: error: undefined reference to
> 'v8::Object::Set(v8::Local, v8::Local)'
>
> jni/BoomListPackagesAndroid.cpp:126: error: undefined reference to
> 'v8::Object::Set(v8::Local, v8::Local)'
>
> jni/../../src/common/js/v8/BoomEngine.v8.cpp:31: error: undefined
> reference to 'v8::Isolate::GetCurrent()'
>
> 
>
>
> I'm building on MacOSX for Android; I would guess the linker errors are
> because of the no archive symbol table error at the top...
>
> How can I fix them?
>
>
>
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/vIn1RNWosjM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] v8 build issues for Android.

2017-01-25 Thread Jochen Eisinger
Building with gyp is no longer support (sorry about the outdated docs).

You'll have to use gn and set target_os = "android" and target_cpu = "arm"

hth
-jochen

On Tue, Jan 24, 2017 at 6:11 PM Dzung Tran  wrote:

> I followed the instructions on
> https://github.com/v8/v8/wiki/Building%20with%20Gyp
>
> and I get the error with linking at the end as in:
>
>   CXX(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/utrie2_builder.o
>   CXX(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/utrie2.o
>   CXX(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/utrie.o
>   CXX(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/uts46.o
>   CC(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/utypes.o
>   CXX(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/uvector.o
>   CXX(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/uvectr32.o
>   CXX(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/uvectr64.o
>   CC(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/common/wintz.o
>   CC(host)
> /home/parallels/v8/out/android_arm.release/obj.host/icuuc/third_party/icu/source/stubdata/stubdata.o
>   AR(host)
> /home/parallels/v8/out/android_arm.release/obj.host/third_party/icu/libicuuc.a
>   AR(host)
> /home/parallels/v8/out/android_arm.release/obj.host/src/libv8_libsampler.a
>   CXX(host)
> /home/parallels/v8/out/android_arm.release/obj.host/mksnapshot/src/snapshot/mksnapshot.o
>   LINK(host) /home/parallels/v8/out/android_arm.release/mksnapshot
> /home/parallels/v8/out/android_arm.release/obj.host/src/libv8_libplatform.a(/home/parallels/v8/out/android_arm.release/obj.host/v8_libplatform/src/libplatform/default-platform.o):../src/libplatform/default-platform.cc:function
> v8::platform::CreateDefaultPlatform(int): error: undefined reference to
> 'v8::base::SysInfo::NumberOfProcessors()'
> /home/parallels/v8/out/android_arm.release/obj.host/src/libv8_libplatform.a(/home/parallels/v8/out/android_arm.release/obj.host/v8_libplatform/src/libplatform/default-platform.o):../src/libplatform/default-platform.cc:function
> v8::platform::DefaultPlatform::SetThreadPoolSize(int): error: undefined
> reference to 'v8::base::SysInfo::NumberOfProcessors()'
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[2]: *** [/home/parallels/v8/out/android_arm.release/mksnapshot] Error
> 1
> make[2]: Leaving directory `/home/parallels/v8/out'
> make[1]: *** [android_arm.release] Error 2
> make[1]: Leaving directory `/home/parallels/v8'
> make: *** [android_arm.release] Error 2
>
> Any help would be greatly appreciated.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] v8 linker issues for android build on Mac

2017-01-25 Thread Jochen Eisinger
Using gn to build for android on mac is not yet supported, sorry (and I
realize that the make based version is also no longer supported...) sorry
about that :/

On Wed, Jan 25, 2017 at 2:08 AM Mindy DelliCarpini 
wrote:

>
>
> I built libv8_base, libv8_libbase,  these as full static libraries:
>
>
> args.gn:
>
> is_debug = false
>
> target_cpu = "arm"
>
> v8_target_cpu = "arm"
>
> target_os="android"
>
> v8_static_library = true
>
>
> Errors:
>
> ...android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
> error: jni/libpng.a: no archive symbol table (run ranlib)
>
>
> ...android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
> error: jni/libv8_libbase.a: no archive symbol table (run ranlib)
>
>
> ...android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
> error: jni/libv8_libplatform.a: no archive symbol table (run ranlib)
>
>
> Follow by a bunch of unsatisfied linker errors:
>
>
> jni/BoomListPackagesAndroid.cpp:124: error: undefined reference to
> 'v8::Object::Set(v8::Local, v8::Local)'
>
> jni/BoomListPackagesAndroid.cpp:125: error: undefined reference to
> 'v8::Object::Set(v8::Local, v8::Local)'
>
> jni/BoomListPackagesAndroid.cpp:126: error: undefined reference to
> 'v8::Object::Set(v8::Local, v8::Local)'
>
> jni/../../src/common/js/v8/BoomEngine.v8.cpp:31: error: undefined
> reference to 'v8::Isolate::GetCurrent()'
>
> 
>
>
> I'm building on MacOSX for Android; I would guess the linker errors are
> because of the no archive symbol table error at the top...
>
> How can I fix them?
>
>
>
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] how to get the v8 the type T value of handle type

2017-01-19 Thread Jochen Eisinger
location_ should be of type T**, so you could print
*(v8::internal::Script)**0x5562ae08 or (assuming the compiler
didn't inline the operator*), you could just derefence the handle and print
*$2

On Fri, Jan 20, 2017 at 6:25 AM Jason Zoo  wrote:

> Hi,I use lldb debug v8
> I'd set a breakpoint at src/parsing/parsing.cc:36 line. And I use `p info`
> to debug this ParseInfo type value. I use `p $2` command to  see 
> (v8::internal::Handle)
> type value.But I wonder to know how to get the value of the 
> (v8::internal::Script)
> type . Any idea?
>
>
> (lldb) p info
> (v8::internal::ParseInfo *) $0 = 0x7fffc068
> (lldb) p *$0
> (v8::internal::ParseInfo) $1 = {
>   zone_ = 0x7fffc118
>   flags_ = 4241
>   source_stream_ = 0x
>   source_stream_encoding_ = ONE_BYTE
>   character_stream_ = 0x
>   extension_ = 0x
>   compile_options_ = kNoCompileOptions
>   script_scope_ = 0x5563a930
>   asm_function_scope_ = 0x
>   unicode_cache_ = 0x555e9220
>   stack_limit_ = 140737487332792
>   hash_seed_ = 896107161
>   compiler_hints_ = 0
>   start_position_ = 0
>   end_position_ = 0
>   function_literal_id_ = -1
>   max_function_literal_id_ = 1
>   isolate_ = 0x555d3270
>   shared_ = {
> v8::internal::HandleBase = {
>   location_ = 0x
> }
>   }
>   script_ = {
> v8::internal::HandleBase = {
>   location_ = 0x5562ae08
> }
>   }
>   maybe_outer_scope_info_ = {
> location_ = 0x
>   }
>   cached_data_ = 0x
>   ast_value_factory_ = 0x556385d0
>   function_name_ = 0x
>   literal_ = 0x5563c388
> }
> (lldb) p $0->script_
> (v8::internal::Handle) $2 = {
>   v8::internal::HandleBase = {
> location_ = 0x5562ae08
>   }
> }
> (lldb) p $2
> (v8::internal::Handle) $2 = {
>   v8::internal::HandleBase = {
> location_ = 0x5562ae08
>   }
> }
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] LINK PROBLEM sqlite wants system ICU libs, v8 wants private 3rd party versions

2017-01-19 Thread Jochen Eisinger
You should be able to compile v8 against the system ICU library following
these steps:
https://cs.chromium.org/chromium/src/build/linux/unbundle/?q=src/build/linux/unbundle

If you set v8_static_library = true and is_component_build = false you
should get static libraries

best
-jochen

On Thu, Jan 19, 2017 at 12:07 PM Ben Noordhuis  wrote:

> On Wed, Jan 18, 2017 at 11:49 PM, kent williams 
> wrote:
> > Subject line says it all:
> >
> > When I link my app to the v8 library, I have 2 choices:
> >
> > 1. Link to the system ICU libraries (ICU v 50 on Centos 7), in which
> case,
> > there are undefined references in v8 to icu v58.
> > 2. Link to v8 versions of ICU library, in which case there are undefined
> > references to icu v50 from the sqlite library.
> >
> > I would configure sqlite to use v8's libraries but it isn't
> straightforward,
> > specifically configuring sqlite to add -I for all the directories where
> icu
> > headers are located.
> >
> > Any suggestions? All I can come up with is an unacceptable solution:
> turning
> > off il8n in either v8 or sqlite.
> >
> >
> > Bonus points if you can tell me how to use a gn build that permits static
> > linking ;-)
>
> I can't tell you how to do it with GN (I still use GYP) but I'd
> probably rig the build so each library links privately to its version
> of ICU, see [0] for an example.  V8 doesn't re-export ICU symbols, and
> neither does sqlite as far as I know, so it should be reasonably
> straightforward.
>
> [0]
> http://stackoverflow.com/questions/228117/loading-multiple-shared-libraries-with-different-versions
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Streams and InternalPackedArray queue scalability

2017-01-17 Thread Jochen Eisinger
+Domenic Denicola 

On Wed, Jan 18, 2017 at 4:25 AM Adam Rice  wrote:

> I work on the Chrome implementation of ReadableStream and WritableStream
> . They are implemented in Javascript
> using v8 extras.
>
> They currently use an InternalPackedArray to implement a queue structure,
> however I have found a scalability issue. The benchmarks and repro can be
> found at http://crbug.com/681493 ("ReadableStream, WritableStream get
> dramatically slower when queue grows to 56720 chunks").
>
> I have a proposed fix at http://crrev.com/2637863002. If possible, I
> would like someone who is familiar with the implementation of
> InternalPackedArray to review it.
>
> Particular things I'd like to know:
>
>- Is it worth worrying about deopt or would it be better to use
>InternalPackedArray for small queues and only switch to Queue for larger
>ones?
>- Is 32768 a good size to split the arrays at? Can we be reasonably
>sure that it is small enough to get good behaviour on all platforms and
>architectures?
>
> and if possible
>
>- why does performance change so dramatically at a threshold?
>
> Thanks,
> Adam Rice
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Implication of the context parameter in v8::Object::Set().

2017-01-17 Thread Jochen Eisinger
right. also, it makes it explicit in which context a possible exception
should be thrown

On Wed, Jan 18, 2017 at 8:19 AM Ben Noordhuis  wrote:

> On Tue, Jan 17, 2017 at 9:03 PM, Jane Chen  wrote:
> > Why does v8::Object::Set() takes a context parameter now?  Does it mean
> that
> > if an object is created in one context, it can only be used in that
> context?
> >
> > Thanks.
>
> The rules for object and property access didn't change.  I think the
> context parameter is to disambiguate between method overloads that
> return Local and MaybeLocal, since C++ doesn't allow overloading of
> just the return value.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How to compile the samples/hello-world.cc example on ubuntu 64 bit ?

2017-01-11 Thread Jochen Eisinger
can you build a current version of V8 (using gn/ninja)?

On Fri, Jan 6, 2017 at 8:25 PM <vertabso...@gmail.com> wrote:

> Thank you for your answer Jochen Eisinger, but I tried this and it didn't
> work, of course. I couldn't switch to the 4.8 version of v8, I don't know
> why. Moreover, I would like to compile with an up-to-date version of v8.
>
>
> Le lundi 2 janvier 2017 09:39:30 UTC+1, Jochen Eisinger a écrit :
>
> https://github.com/v8/v8/wiki/Getting%20Started%20with%20Embedding explains
> how to compile the sample
>
> note that if you build all of v8, the hello world sample will be compiled
> automatically
>
> On Sun, Dec 25, 2016 at 8:39 PM <verta...@gmail.com> wrote:
>
> Hello everyone,
>
> I am new to v8. I am trying to achieve something that should be easy, but
> I just can't get it right.
>
> I have downloaded v8 via depot-tools and built it via make x64, and now I
> am trying to compile the hello-world example which is given in the
> "samples" folder.
> What command am I supposed to type in ubuntu terminal for this to work,
> please ?
>
> I have tried g++ hello-world.cc -o hello -I. but that fails with the
> following error :
>
> In file included from hello-world.cc:9:0:
> include/libplatform/libplatform.h:8:44: fatal error:
> libplatform/libplatform-export.h: No such file or directory
> compilation terminated.
>
> Thank you.
>
> --
> --
> v8-users mailing list
>
> v8-u...@googlegroups.com
>
>
> 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 v8-users+u...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Building with MSVC & GN - Where do the static files go?

2017-01-11 Thread Jochen Eisinger
With the latest dev version of V8 (5.7), you should be able to get static
libraries using the gn flag v8_static_library = true

On Tue, Jan 10, 2017 at 4:26 PM Hans Maier  wrote:

> Hi,
>
> I had the same issue. I ended up creating the static libs from the
> obj-files using the MSVC lib tool manually.
>
> Unsatisfactory, but it was working for me.
>
> Am Montag, 9. Januar 2017 15:55:40 UTC+1 schrieb Brendan Bates:
>
> Hello,
>
> I have seen this issue pop up a couple times on here and wondering what
> the current status is.  I was spending the morning trying to get ahead of
> the game and switch from a Gyp build to a GN build.  We are using MSVC 2015
> to perform the build.  I am successfully configuring and building using the
> following commands:
>
> > gn gen out/x86.debug --args="is_debug=true v8_use_snapshot=false
> target_cpu=\"x86\" disable_libfuzzer=true"
> Done. Made78 targets from 44 files in 1900ms
>
> > ninja-C out/x86.debug d8
> ninja: Entering directory `out.gn/x86.debug'
> [49/886] LINK mkpeephole.exe mkpeephole.exe.pdb
> LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF'
> specification
> [886/886] LINK d8.exe d8.exe.pdb
> LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF'
> specification
>
> The build results are confusing, however.  In the "out" directory, I find
> the v8.dll, along with the icu*.dll files.  What seems to be missing are
> the static .lib files that were necessary in previous builds
> (v8_libbase.lib, v8_libplatform.lib and v8_nosnapshot.lib).  My build with
> new new v8 DLL does not seem to work without these.  So I attempted a
> static build, by adding the GN argument `is_component_build=false`.  To my
> surprise, no static libraries were generated at all!  Is this something
> that is planning on being supported in the future?  If not, what is the way
> around this?  I certainly don't want to transition my project to use GN.
> Thoughts?  Thanks in advance.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How to compile the samples/hello-world.cc example on ubuntu 64 bit ?

2017-01-02 Thread Jochen Eisinger
https://github.com/v8/v8/wiki/Getting%20Started%20with%20Embedding explains
how to compile the sample

note that if you build all of v8, the hello world sample will be compiled
automatically

On Sun, Dec 25, 2016 at 8:39 PM  wrote:

> Hello everyone,
>
> I am new to v8. I am trying to achieve something that should be easy, but
> I just can't get it right.
>
> I have downloaded v8 via depot-tools and built it via make x64, and now I
> am trying to compile the hello-world example which is given in the
> "samples" folder.
> What command am I supposed to type in ubuntu terminal for this to work,
> please ?
>
> I have tried g++ hello-world.cc -o hello -I. but that fails with the
> following error :
>
> In file included from hello-world.cc:9:0:
> include/libplatform/libplatform.h:8:44: fatal error:
> libplatform/libplatform-export.h: No such file or directory
> compilation terminated.
>
> Thank you.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] building V8 for Android on Mac or ubuntu w static libs?

2016-12-22 Thread Jochen Eisinger
hey,

to build for android, you should add target_os = "android" and target_cpu =
"arm".

you'll also have to add target_os = ['android', 'mac'] to your .gclient
file (which should be one level up from your v8 checkout), so gclient sync
will download the android specific deps

hth
-jochen

On Thu, Dec 22, 2016 at 5:41 PM 'Mindy DelliCarpini' via v8-users <
v8-users@googlegroups.com> wrote:

> Need a V8 build for our prototyping tool (boom.googleplex.com). The tool
> runs with a Mac simulator, so the build has to be completed on a Mac.
>
> The TOT v8 builds are broken for Mac, and also for building static full
> libraries (no the thin .a files, which wouldn't be shareable)
>
> I'm interested in getting any of the following working (preference for Mac
> build, but I know its not a common thing)
>
> 1) *Build v8 on my mac*
> Tried old instructions, but failed with missing libraries (standard c++?)
> https://github.com/v8/v8/wiki/D8-on-Android
> Tried new instructions:
> tools/dev/v8gen.py arm.release
> Added: target_os=arm
> Getting this failure:
>
> /Users/mindyp/local/src/v8/buildtools/mac/gn
> --root=/Users/mindyp/local/src/v8 -q --check gen .
>
> ERROR Unresolved dependencies.
>
> //:run_mkpeephole(//build/toolchain/android:android_arm)
>
>   needs //:mkpeephole(//build/toolchain/mac:clang_x86_v8_arm)
>
> //:run_mksnapshot(//build/toolchain/android:android_arm)
>
>   needs //:mksnapshot(//build/toolchain/mac:clang_x86_v8_arm)
>
>
> 2) *Full static library build on Linux that is not just the .a, so I can
> transfer it to my mac*
> Followed:
> http://linuxplayer.org/2013/12/how-to-build-v8-static-library
> But this breaks during the LD phase
> Added: https://bugs.chromium.org/p/v8/issues/detail?id=5617#c1
>  (LDFLAGS=-lc++)
> Still broken
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Looking for streamlined way to access object properties

2016-12-07 Thread Jochen Eisinger
You could use v8::Object::GetOwnPropertyNames instead of trying each key
individually

On Tue, Dec 6, 2016 at 11:04 PM kent williams 
wrote:

> There's a convention that we use for our C++ native functions called from
> C++, where required arguments are followed (optionally) by an object whose
> properties are additional flags. EG
>
> var num = convertNumber(x);
> var num2 = convertNumber(x, { base: 8 });
>
> Is there a streamlined way to extract properties from this optional object?
>
> I end up doing this:
>
> v8::Local argsObj;
> argsObj.Clear();
> if(args.Length() >=2)
>   argsObj = args[1];
>
> const char *cvval = 0;
> if(!argsObj.IsEmpty()) {
>   v8::Local cvt = v8::String::NewFromUtf8(isolate,
>"convert",
> v8::NewStringType::kNormal).ToLocalChecked();
>   v8::MaybeLocal convertval = argsObj->Get(context,cvt);
>
>   if(!convertval.IsEmpty()) {
> v8::Local cv = convertval.ToLocalChecked();
> v8::String::Utf8Value val2 = cv->ToString();
> cvval = *val2 ? *val2 : 0;
>   }
> }
>
> This seems like a whole lot of work -- way more than Spidermonkey, for
> example.
>
> Are there some convenience functions that make this less painful, or do I
> have to write my own?
>
> Thanks!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] gypfiles/gyp_v8 options to this script

2016-12-07 Thread Jochen Eisinger
no, the options aren't documented :-/

However, gyp is deprecated, have you looked at gn yet?

On Wed, Dec 7, 2016 at 9:30 AM  wrote:

> Is there anywhere documented what options and values does gypfiles/gyp_v8
>  script take ?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: What's the correct way to build V8 as a static library on macOS?

2016-12-05 Thread Jochen Eisinger
sorry for the long delay in answering.

I don't know how to control the rpath, maybe asking on gn-...@chromium.org is
an option?

On Mon, Nov 28, 2016 at 11:05 AM John Gardner <gardnerjo...@gmail.com>
wrote:

> Ah awesome, thanks!
>
> Similar question: is it possible to set the rpath at linking-time when
> compiling a component build? It doesn't seem like ldflags can be modified
> from a configuration-level. Perhaps I'm using the wrong approach...
>
> I need each dylib to be compiled with an absolute rpath (specifically,
> /usr/local/opt). Currently, it's attempting to load shared libraries from
> the executable's path, which doesn't work for the intended directory
> arrangement:
>
> lib
> lib/libv8.dylib
> lib/libicuuc.dylib
> lib/libicui18n.dylib
> bin
> bin/v8
>
>
> On Monday, 28 November 2016 20:51:45 UTC+11, Jochen Eisinger wrote:
>
> with https://codereview.chromium.org/2373783002/ it should be possible to
> set v8_static_library to true to get static libraries
>
> On Sat, Nov 26, 2016 at 9:05 AM John Gardner <gardne...@gmail.com> wrote:
>
> A tracking issue <https://github.com/electron/electron/issues/7940> at
> Electron's repository confirms that it's not possible to build static
> libraries using GN:
>
> Under gn, there is no way to have v8 build as a standalone static library.
> This is because v8 and other intermediate targets used to build chrome.exe
>  are source_set targets in chrome's gn files <https://goo.gl/VM4xOk>.
> These are like virtual targets, and only object (.o) files are ever
> generated for them.
>
>
> A trick described here
> <https://groups.google.com/forum/#!topic/v8-users/Y05xPj956Ys> involves
> modifying *v8/gni/v8.gni* to force static library generation:
>
> template("v8_source_set") {
>  static_library(target_name) {
>
> Which results in these files being included in *out.gn/x64.release/obj/
> <http://out.gn/x64.release/obj/>* after building with Ninja:
>
>-
>- libfuzzer_support.a
>- libjson_fuzzer.a
>- libparser_fuzzer.a
>- libregexp_fuzzer.a
>- libsimple_fuzzer.a
>- libv8_base.a
>- libv8_external_snapshot.a
>- libv8_libbase.a
>- libv8_libplatform.a
>- libv8_libsampler.a
>- libv8_nosnapshot.a
>- libv8_snapshot.a
>- libwasm_asmjs_fuzzer.a
>- libwasm_fuzzer.a
>
>
>
> On Saturday, 26 November 2016 17:34:00 UTC+11, tbl...@icloud.com wrote:
>
> Actually, that's the wrong link. I've completely forgotten where I found
> out that information.
>
> --
> --
> v8-users mailing list
>
> v8-u...@googlegroups.com
>
>
> 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 v8-users+u...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Segfault calling v8::Persistent::Reset.

2016-12-02 Thread Jochen Eisinger
Can you reproduce this and catch it in a debugger? Or run with ASAN enabled?

On Fri, Dec 2, 2016 at 2:18 AM Jane Chen  wrote:

> Embedding v8 5.3.  Seeing a segfault in our stress test:
>
> Critical: #6  0x7fbf3f6c0173 in 
> v8::internal::GlobalHandles::Node::Release() () from lib/libv8.so
>
> This happens when v8::Persistent::Reset is called.
>
> Has anyone else seen this?  Any clues on what might be wrong?
>
> Thanks.
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: What's the correct way to build V8 as a static library on macOS?

2016-11-28 Thread Jochen Eisinger
with https://codereview.chromium.org/2373783002/ it should be possible to
set v8_static_library to true to get static libraries

On Sat, Nov 26, 2016 at 9:05 AM John Gardner  wrote:

> A tracking issue  at
> Electron's repository confirms that it's not possible to build static
> libraries using GN:
>
> Under gn, there is no way to have v8 build as a standalone static library.
> This is because v8 and other intermediate targets used to build chrome.exe
>  are source_set targets in chrome's gn files .
> These are like virtual targets, and only object (.o) files are ever
> generated for them.
>
>
> A trick described here
>  involves
> modifying *v8/gni/v8.gni* to force static library generation:
>
> template("v8_source_set") {
>  static_library(target_name) {
>
> Which results in these files being included in *out.gn/x64.release/obj/
> * after building with Ninja:
>
>-
>- libfuzzer_support.a
>- libjson_fuzzer.a
>- libparser_fuzzer.a
>- libregexp_fuzzer.a
>- libsimple_fuzzer.a
>- libv8_base.a
>- libv8_external_snapshot.a
>- libv8_libbase.a
>- libv8_libplatform.a
>- libv8_libsampler.a
>- libv8_nosnapshot.a
>- libv8_snapshot.a
>- libwasm_asmjs_fuzzer.a
>- libwasm_fuzzer.a
>
>
>
> On Saturday, 26 November 2016 17:34:00 UTC+11, tbl...@icloud.com wrote:
>
> Actually, that's the wrong link. I've completely forgotten where I found
> out that information.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] v8 gyp for inspector dll configuration fails

2016-11-28 Thread Jochen Eisinger
I guess https://codereview.chromium.org/2529333002 should fix this

On Thu, Nov 24, 2016 at 7:48 PM iva  wrote:

> Hi,
>
> I am trying to build v8 with the inspector support. The v8 is linked as
> dll. On Windows 10, environment variable set for vs2015. Generator set to
> msvs. I fail at the gyp step when I try to generate solutions with
> inspector enabled (without the inspector everything is fine):
> >python gypfiles\gyp_v8 -Dtarget_arch=x64 -Dcomponent=shared_library
> -Dv8_enable_inspector=1
> Updating projects from gyp files...
> gyp: Unable to find targets in build file D:\v8\test\debugger\debugger.gyp
> Is there an additional option I must use or any idea of what can the
> problem be?
>
> Regards
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] InternalFieldCount seems to be ignored when ConstructorBehavior is kThrow

2016-11-28 Thread Jochen Eisinger
could you file a bug including a repro at crbug.com/v8/new please?

thanks
-jochen

On Sat, Nov 26, 2016 at 2:14 AM  wrote:

> When I set the constructor behavior on my FunctionTemplate to kThrow
> (instead of the default kAllow), then create an object from the template
> using InstanceTemplate()->NewInstance(), it seems like the
> InternalFieldCount on the InstanceTemplate is ignored, and the object that
> gets created has 0 internal fields. This only happens when I set the
> constructor behavior to kThrow. Is this a bug? How can I get the object to
> have the right number of internal fields?
>
> ~Theodore
>
> PS: I'm using the version of V8 at branch-heads/5.4.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Unable to download V8 on Ubuntu Linux

2016-11-12 Thread Jochen Eisinger
it looks like the connection to the download servers timed out. Maybe try
again?

On Thu, Nov 10, 2016 at 7:39 AM  wrote:

> Trying to compile V8 for Android. I have Depot Tools, G++ etc all setup
> and running.
>
> The "gclient sync" command seems to exit with an error. On further
> investigation it seems to fail  in several places.
>
> Here are some errors:
>
> 
> 
>
> File
> "/home/sanjit/depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/httplib2/python2/httplib2/__init__.py",
> line 1018, in connect
> sock.connect((self.host, self.port))
>   File "/usr/lib/python2.7/socket.py", line 228, in meth
> return getattr(self._sock,name)(*args)
> socket.timeout: timed out
> ]
> y", line 228, in meth
> return getattr(self._sock,name)(*args)
> socket.timeout: timed out
> ]
> Downloading 1 files took 1985.098521 second(s)
> Downloading
> /home/sanjit/V8Dev/v8/third_party/binutils/Linux_x64/binutils.tar.bz2
> Traceback (most recent call last):
>   File "v8/third_party/binutils/download.py", line 117, in 
> sys.exit(main(sys.argv))
>   File "v8/third_party/binutils/download.py", line 106, in main
> return FetchAndExtract(arch)
>   File "v8/third_party/binutils/download.py", line 81, in FetchAndExtract
> '-s', sha1file])
>   File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['download_from_google_storage',
> '--no_resume', '--no_auth', '--bucket', 'chromium-binutils', '-s',
> '/home/sanjit/V8Dev/v8/third_party/binutils/Linux_x64/binutils.tar.bz2.sha1']'
> returned non-zero exit status 1
> Error: Command '/usr/bin/python v8/third_party/binutils/download.py'
> returned non-zero exit status 1 in /home/sanjit/V8Dev
> Hook '/usr/bin/python v8/third_party/binutils/download.py' took 1985.19
> secs
>
>
>
>
> Please help !
> Sanjit
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] libstdc++ from gcc4.6 used to build ICU and v8?

2016-11-12 Thread Jochen Eisinger
We're working on upgrading the sysroot, however, I'm not aware of any
documentation on how to do that, sorry

On Fri, Nov 11, 2016 at 3:16 PM Jane Chen <jxche...@gmail.com> wrote:

> I now have a test case to confirm that having a mixed std c++ lib of 4.6
> and 4.8 causes my app to crash.  Does v8 support swapping sysroot with
> something else?  If so, where can I find some information in doing so?
>
>
> On Wednesday, November 2, 2016 at 3:48:37 AM UTC-7, Jochen Eisinger wrote:
>
> This is because the sysroot (in build/linux/) is outdated. I filed
> crbug.com/661506 to track this
>
> On Tue, Nov 1, 2016 at 4:41 PM Jane Chen <jxch...@gmail.com> wrote:
>
> I'm investigating a crash in a debug build of our app embedding v8
> 5.3-lkgr and notice libstdc++ from gcc4.6 is included and referenced from
> some of the makefiles to build ICU and v8, although v8 5.3-lkgr requires
> gcc 4.8 or above to build on Linux.  Am I missing something while building
> v8?
>
> Thanks in advance.
>
> --
> --
> v8-users mailing list
>
> v8-u...@googlegroups.com
>
>
> 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 v8-users+u...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Linking V8 to app on Windows

2016-11-10 Thread Jochen Eisinger
on 5.3, it's not yet possible to build the libplatform as a shared library
(dll), sorry. This is fixed in the current development branch.

also, by default we don't actually create static libraries, but gn just
keeps track of the object files you need. You can change that by manually
replacing source_set with static_library in the v8_source_set template in
gni/v8.gni

hth
-jochen

On Thu, Nov 10, 2016 at 3:37 PM Ivan Pizhenko 
wrote:

So I would like to hear comments on this from some V8 developer or whoever
solved the issue w/o Nuget package.

2016-11-10 16:05 GMT+02:00 Ivan Pizhenko :

Thank you for advise, George, but what you suggest is not an option in the
my case, I need to have built from sources exactly this stable version
5.3.332.45. There is no Nuget package fir exactly this version, and there
are also other circumstances those prevent me using  Nuget package. So I am
looking for exactly an explanation on how to solve this manually.

2016-11-09 19:36 GMT+02:00 George Marques :

I also had troubles with the build system. I found it's much easier to just
use this Nuget package: https://github.com/pmed/v8-nuget.


On Wednesday, November 9, 2016 at 5:42:19 AM UTC-2, Ivan P. wrote:

Hello, I am porting my app from V8 3.19 to V8 5.3.332.45.
I have built new V8 version as DLL using Visual Studio 2013, updated code
of my app to use updated APIs  and now trying to perform full build of my
app.
My app doesn't use GN to build it, it is normal Visual Studio 2013 project.
I have specified v8.dll.lib as additional linker input.

I get following linker error:
1>v8init.obj : error LNK2019: unresolved external symbol "class
v8::Platform * __cdecl v8::platform::CreateDefaultPlatform(int)"
(?CreateDefaultPlatform@platform@v8@@YAPEAVPlatform@2@H@Z) referenced in
function  "

I suppose v8::platform::CreateDefaultPlatform() must be present in
libplatform, but because the error happens, I can make conclusion that
libplatform it is not included into v8.dll.lib.
I have examined V8 build outputs and couldn't find libplatform as separate
static lib or DLL: here is list of libs generated during the build, here is
what I have:

icui18n.dll
icuuc.dll
msvcp120.dll
msvcp120d.dll
msvcr120.dll
msvcr120d.dll
pgort120.dll
v8.dll


cctest.lib
generate-bytecode-expectations.lib
icui18n.dll.lib
icuuc.dll.lib
mksnapshot.lib
unittests.lib
v8.dll.lib
v8_parser_shell.lib
v8_simple_json_fuzzer.lib
v8_simple_parser_fuzzer.lib
v8_simple_regexp_fuzzer.lib
v8_simple_wasm_asmjs_fuzzer.lib
v8_simple_wasm_fuzzer.lib

Please advise - either how to tune build to have libplatform generated as
separate DLL or included to v8.dll ?
Or is it safe to make manually libplatform from obj files and link it,
taking into account v8 is DLL?

Thanks.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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/Y05xPj956Ys/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Embedded v8 in Android: crash when executing persistent Function in another thread

2016-11-10 Thread Jochen Eisinger
can you file a bug at crbug.com/v8/new please? It would be great if you
could provide a complete repro case!

thanks
-jochen

On Thu, Nov 10, 2016 at 11:14 AM Kevin Read  wrote:

> Hi all,
>
> I'm in the process of porting my embedded v8 from a very old version to
> current stable. I have this code that is called from JNI from a different
> thread than the one that initially created the Isolate and the initial
> context:
>
> v8::Locker l (isolate);
> Isolate::Scope isolateScope(isolate);
> Context::Scope
> context_scope(*reinterpret_cast(context->_context));
>
> HandleScope scope (isolate);
> TryCatch trycatch;
>
> // Get pointers to persistent objects created by 'new
> Persistent(_local)'
> WrapPersistentObj* wo = (WrapPersistentObj*)thisPtr;
> Local thisObj = (*reinterpret_cast(>obj));
> WrapPersistentFunc* ws = (WrapPersistentFunc*)jsCbPtr;
> Local callbackP = Local::New(isolate,
> *reinterpret_cast(>callbackFunc));
> int argcount = 0;
> Handle argarray[] = { };
>
> Handle result = callbackP->Call(thisObj, argcount, argarray);
>
> The Call method crashes with this message in debug build (doesn't crash in
> release build):
>
> 11-10 12:08:25.665  3212232162 v8  E  #
>
> 11-10 12:08:25.665  3212232162 v8  E  # Fatal
> error in ../../src/parsing/parser.cc, line 730
>
> 11-10 12:08:25.665  3212232162 v8  E  #
>
> 11-10 12:08:25.665  3212232162 v8  E  Check
> failed: ThreadId::Current().Equals(info->isolate()->thread_id()).
>
> 11-10 12:08:25.665  3212232162 v8  E  #
>
> 11-10 12:08:25.667  3212232162   libc  F  Fatal
> signal 4 (SIGILL), code 1, fault addr 0x997d2f98 in tid 32162 (V8Engine)
>
> 11-10 12:08:25.670   271  271  W  debuggerd:
> handling request: pid=32122 uid=10116 gid=10116 tid=32162
>
> 11-10 12:08:25.704  3221232212  DEBUG  F  *** *** ***
> *** *** *** *** *** *** *** *** *** *** *** *** ***
>
>
> All access to the Isolate in all parts of the app is protected by Locker
> instances, so I'm not sure where this comes from.
>
>
> Any help would be appreciated.
>
>
> Thanks and best,
>
> Kevin
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Building V8 libs for Android on Windows 10

2016-11-08 Thread Jochen Eisinger
Looks like you might need to install the g++ package?

On Mon, Nov 7, 2016 at 12:39 PM Trekkie Ufo  wrote:

> Hi, managed to install everything on Ubuntu Linux and fired off a V8 build
> for Android.
>
> (1) gn gen out.gn/foo --args='is_debug=false target_cpu="arm64"
> v8_target_cpu="arm64" use_goma=false target_os = "android"
> is_component_build = true '
> (2) ninja -C out.gn/foo
>
> I keep getting errors like the following, any suggestions ?
>
>
> compilation terminated.
> [604/2337] CXX obj/lib_wasm_section_fuzzer/wasm-section-fuzzers.o
> FAILED: obj/lib_wasm_section_fuzzer/wasm-section-fuzzers.o
> ../../third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++
> -MMD -MF obj/lib_wasm_section_fuzzer/wasm-section-fuzzers.o.d
> -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PRINTING=1
> -DENABLE_BASIC_PRINTING=1 -DENABLE_SPELLCHECK=1
> -DUSE_BROWSER_SPELLCHECKER=1 -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC
> -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DDISABLE_NACL
> -DENABLE_SUPERVISED_USERS=1 -DSAFE_BROWSING_DB_REMOTE -DCHROMIUM_BUILD
> -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64
> -DANDROID -DHAVE_SYS_UIO_H -DANDROID_NDK_VERSION=r12b -DCOMPONENT_BUILD
> -D__GNU_SOURCE=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
> -DUSING_V8_SHARED -DV8_IMMINENT_DEPRECATION_WARNINGS -DV8_I18N_SUPPORT
> -DENABLE_HANDLE_ZAPPING -DV8_USE_EXTERNAL_STARTUP_DATA
> -DV8_TARGET_ARCH_ARM64 -I../.. -Igen -I../../include -Igen/include -I../..
> -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector
> -funwind-tables -fPIC -pipe -ffunction-sections -fno-short-enums
> -finline-limit=64 -fno-omit-frame-pointer -gdwarf-3 -g2
> --sysroot=../../third_party/android_tools/ndk/platforms/android-21/arch-arm64
> -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized
> -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident
> -fdata-sections -ffunction-sections -fno-threadsafe-statics
> -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti
> -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include
> -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include
> -isystem../../third_party/android_tools/ndk/sources/android/support/include
> -fno-exceptions -Wno-deprecated -Wno-narrowing -c
> ../../test/fuzzer/wasm-section-fuzzers.cc -o
> obj/lib_wasm_section_fuzzer/wasm-section-fuzzers.o
> In file included from ../../test/fuzzer/wasm-section-fuzzers.h:11:0,
>  from ../../test/fuzzer/wasm-section-fuzzers.cc:5:
> ../../src/wasm/wasm-module.h:8:18: fatal error: memory: No such file or
> directory
>  #include 
>   ^
> compilation terminated.
> [607/2337] CXX
> clang_x64_v8_arm64/obj/...pector/inspector/v8-stack-trace-impl.o
> ninja: build stopped: subcommand failed.
> sanjit@sanjit-VirtualBox:~/v8$
>
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Memory allocation tracking in V8

2016-11-07 Thread Jochen Eisinger
in general, you can check bit.ly/v8-api-changes to learn about replacements
for deprecated and removed APIs

On Mon, Nov 7, 2016 at 11:51 AM Michael Lippautz 
wrote:

> On Fri, Nov 4, 2016 at 4:01 PM Ivan P.  wrote:
>
> Hello, I am porting my app to latest stable version of the V8 engine from
> quite legacy V8 3.19.
> I was using v8::V8::AddMemoryAllocationCallback() to set callaback on the
> memory allocation actions.
> But now I can't find this function. What is analog to this in the new V8?
> I am porting to version 5.3.332.45
>
>
> AddMemoryAllocationCallback has been removed because its semantics were
> not clearly defined.
>
> You can use Isolate::GetHeapSpaceStatistics from a combination of
> (a) a GC epilogue callback registered using Isolate::AddGCEpilogueCallback
> (b) an interrupt registered using Isolate::RequestInterrupt.
>
> For coarse-grained (up to a couple %) info (a) will be enough as the GC
> will kick in if memory grows above certain limits. (b) is needed if you
> want more fine-grained statistics.
>
> -Michael
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Building V8 libs for Android on Windows 10

2016-11-06 Thread Jochen Eisinger
Hi,

we currently only support building for Android on a Linux or a Mac host.

best
-jochen

On Sun, Nov 6, 2016 at 2:37 PM Trekkie Ufo  wrote:

> Hi
> I am trying to build V8 for use in a plugin I am developing for the Unreal
> Engine 4. My aim is to run the project on the Google Daydream VR platform
> and hence I need V8 Android libraries. Ive tried everything in your
> documentation but it just doesnt work. Ninja seems to be
> using it and I get compile errors.. Is there a clean step by step doc
> which explains how this is done ?
>
> Thanks for the help !
>
> Sanjit
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Compiling 5.4 v8 for Android

2016-11-02 Thread Jochen Eisinger
I'm not sure, but I think component builds aren't fully supported yet on
5.4, sorry

On Fri, Oct 28, 2016 at 9:25 PM Kevin Read  wrote:

> Hi all,
>
> I'm trying to compile 5.4.500.36 for android using GN. My GN config is:
>
> is_debug=false v8_target_cpu="x86" target_cpu="x86" host_cpu="x64"
> is_clang=true is_component_build=true target_os="android"
> v8_enable_i18n_support=false android_ndk_version="r13"
> android_ndk_major_version="13" v8_use_snapshot=false
>
>
> I use component_build so I can later on create a static library with this
> command (from the obj subdir in the build folder):
>
>
> ~/bin/android-ndk-r13/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-
> *ar* rcvs libv8.a v8/*.o v8_base/*.o v8_libbase/*.o v8_libsampler/*.o
> v8_snapshot/*.o v8_libplatform/*.o v8_libsampler/*.o
>
>
> The result compiles and links ok against my code that uses v8, but for x86
> I get these linker errors:
>
> ../../src/api.cc:5532: error: undefined reference to
> 'v8::internal::ReadNatives()'
>
> ../../src/api.cc:5552: error: undefined reference to
> 'v8::internal::DisposeNatives()'
>
> ../../src/base/once.h:95: error: undefined reference to
> 'v8::internal::SetNativesFromFile(v8::StartupData*)'
>
> ../../src/base/once.h:95: error: undefined reference to
> 'v8::internal::SetSnapshotFromFile(v8::StartupData*)'
>
>
> Is it related to me deactivating snapshots? I'd rather not add all the
> code for loading the blobs from assets for now. Should I add
> v8_nosnapshot/*.o instead of v8_snapshot/*.o into the library?
>
>
> Thanks and best,
>
> Kevin
>
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Breaking On Native Function Calls

2016-10-19 Thread Jochen Eisinger
As far as I know that's not possible. Could you file a feature request for
this (probably on crbug.com if you also want to cover DOM functions)

On Wed, Oct 19, 2016 at 7:38 PM PhistucK  wrote:

> I wanted to know whether there is a V8 (or Chrome) flag of some sort that
> will let me add breakpoints on native function calls.
> I do not mean C++ functions, I mean built in web platform (or ECMAScript)
> functions.
> My issue is that I click on a link and suddenly some code is apparently
> calling document.location.replace("foo") or something and the page
> redirects (maliciously). In order to find the calling code, I want to set a
> breakpoint on calling document.location.replace, which is a native web
> platform function, that is not writable (so I cannot override it with my
> own function using Object.defineProperty, or use a proxy).
> (The code is apparently elusive and obfuscated somewhat, so it is not just
> a search and replace)
> I tried using the Developer Tools API - debug(function), but it did not
> break (even when I call it with setTimeout).
>
> A V8 flag (or a Chrome flag) that either lets me break on calling that
> function, or that overrides the security feature that makes it
> non-writable, or something like that, would let me see the code that calls
> it and find the malicious way it does so.
>
> So, is there something like that?
>
> Thank you!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] ICU options in GN

2016-10-19 Thread Jochen Eisinger
You have to follow the steps outlined in build/linux/unbundle/README to use
the system icu implementation

On Wed, Oct 19, 2016 at 7:50 PM Andre Cunha 
wrote:

> Hello,
>
> The Building with GYP
>  Wiki page describes
> three ways in which I can use ICU while building v8 with GYP: I can disable
> i18n support altogether (i18nsupport=off), use a custom version of ICU
> (icu_gyp_path=...), or use the system's ICU (use_system_icu=1). However,
> when I build with GN, the only option I can find is disabling i18n support
> (v8_enable_i18n_support=false). I tried passing use_system_icu=1 to GN, but
> I got an error.
>
> So, is it possible to use a custom or the system's ICU with GN?
>
> Thank you,
> Andre
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: get error try to get v8 code ,clone depot_tools

2016-10-19 Thread Jochen Eisinger
This implies that either you don't have an up to date list of trusted root
certificates installed, or there's a proxy somewhere between you and the
internet that intercepts ssl traffic.

In both cases, you need to fix your local network configuration.

On Thu, Oct 20, 2016 at 3:35 AM Zuheng Song  wrote:

> i fellow this wiki to builld v8 , but failed
>
> https://github.com/v8/v8/wiki/Building%20with%20GN
> 
> https://github.com/v8/v8/wiki/Checking%20out%20source
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: building v8 fails on bytecode-peephole-table.cc because libv8_libbase.dylib not found

2016-10-19 Thread Jochen Eisinger
If you build for x87, mips (big endian), ppc, or s390, use gyp, the rest is
on gn.

On Tue, Oct 18, 2016 at 11:04 PM Zac Hansen <xax...@gmail.com> wrote:

> How do I find out what the current supported build process is for a
> platform?   I've been told "if gn doesn't work, use gyp, because it's
> supported until gn works on a platform".. but when neither works, I don't
> know which to ask about how to use.
>
> Thank you for all your help.
>
> --Zac
>
> On Tue, Oct 18, 2016 at 12:49 PM, Jochen Eisinger <joc...@chromium.org>
> wrote:
>
> I tried to fix this here but concluded it's "not supported":
> https://codereview.chromium.org/22382003/
>
> On Tue, Oct 18, 2016 at 9:33 AM Zac Hansen <xax...@gmail.com> wrote:
>
> "component build" = dylib?
>
> It's always worked fine - but this error is new.
>
> Linking against the static version takes forever, so dylibs are the only
> way to go.
>
> On Tue, Oct 18, 2016 at 12:31 AM, Jochen Eisinger <joc...@chromium.org>
> wrote:
>
> I'm surprised that the component build with gyp on mac ever worked for
> you, it never did for me :-/
>
> On Tue, Oct 18, 2016 at 5:32 AM Zac Hansen <xax...@gmail.com> wrote:
>
> manually copying the file into /usr/local/lib works.   Someone said it
> might have to do with the "install_name" being /usr/local/lib, but I don't
> really understand what this means.
>
> Also, it seems broken that copying a file into /usr/local is required for
> part of the build.
>
> --Zac
>
>
> On Monday, October 17, 2016 at 8:02:34 PM UTC-7, Zac Hansen wrote:
>
> I've been successfully building v8 for quite a while and recently pulled a
> new version and am getting the following error on os x el capitan:
>
> make library=shared snapshot=off x64.debug -j2
>
>   ACTION src_v8_gyp_v8_base_target_run_mkpeephole
> /Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc
>
> dyld: Library not loaded: /usr/local/lib/libv8_libbase.dylib
>
>   Referenced from: /Users/xaxxon/v8/out/x64.debug/mkpeephole
>
>   Reason: image not found
>
> /bin/sh: line 1: 18072
> <https://maps.google.com/?q=18072=gmail=g> Trace/BPT trap: 5
>   "/Users/xaxxon/v8/out/x64.debug/mkpeephole"
> "/Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc"
>
> make[1]: ***
> [/Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc]
> Error 133
>
> make: *** [x64.debug] Error 2
>
> I try setting my DYLD_LIBRARY_PATH to the recently build dylib but that
> doesn't seem to help and it still complains about it not being in
> /usr/local/lib...
>
> Any suggestions?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/4aBZYlnpYiM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/4aBZYlnpYiM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> v8-users mailing list
> v8-users@goo

Re: [v8-users] Re: building v8 fails on bytecode-peephole-table.cc because libv8_libbase.dylib not found

2016-10-18 Thread Jochen Eisinger
I tried to fix this here but concluded it's "not supported":
https://codereview.chromium.org/22382003/

On Tue, Oct 18, 2016 at 9:33 AM Zac Hansen <xax...@gmail.com> wrote:

> "component build" = dylib?
>
> It's always worked fine - but this error is new.
>
> Linking against the static version takes forever, so dylibs are the only
> way to go.
>
> On Tue, Oct 18, 2016 at 12:31 AM, Jochen Eisinger <joc...@chromium.org>
> wrote:
>
> I'm surprised that the component build with gyp on mac ever worked for
> you, it never did for me :-/
>
> On Tue, Oct 18, 2016 at 5:32 AM Zac Hansen <xax...@gmail.com> wrote:
>
> manually copying the file into /usr/local/lib works.   Someone said it
> might have to do with the "install_name" being /usr/local/lib, but I don't
> really understand what this means.
>
> Also, it seems broken that copying a file into /usr/local is required for
> part of the build.
>
> --Zac
>
>
> On Monday, October 17, 2016 at 8:02:34 PM UTC-7, Zac Hansen wrote:
>
> I've been successfully building v8 for quite a while and recently pulled a
> new version and am getting the following error on os x el capitan:
>
> make library=shared snapshot=off x64.debug -j2
>
>   ACTION src_v8_gyp_v8_base_target_run_mkpeephole
> /Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc
>
> dyld: Library not loaded: /usr/local/lib/libv8_libbase.dylib
>
>   Referenced from: /Users/xaxxon/v8/out/x64.debug/mkpeephole
>
>   Reason: image not found
>
> /bin/sh: line 1: 18072
> <https://maps.google.com/?q=18072=gmail=g> Trace/BPT trap: 5
>   "/Users/xaxxon/v8/out/x64.debug/mkpeephole"
> "/Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc"
>
> make[1]: ***
> [/Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc]
> Error 133
>
> make: *** [x64.debug] Error 2
>
> I try setting my DYLD_LIBRARY_PATH to the recently build dylib but that
> doesn't seem to help and it still complains about it not being in
> /usr/local/lib...
>
> Any suggestions?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/4aBZYlnpYiM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] 18n support flags with gn build

2016-10-18 Thread Jochen Eisinger
I haven't tried this myself yet, but you should be able to use the system
icu by following the steps outlined here:
https://cs.chromium.org/chromium/src/build/linux/unbundle/README for icu.

On Mon, Oct 17, 2016 at 7:25 PM Temuri Imnaishvili 
wrote:

> Hi,
>
> There's this page: https://github.com/v8/v8/wiki/i18n%20support.
>
> What's the equivalent of use_system_icu=1 flag for gn builds?
>
> Thanks!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: building v8 fails on bytecode-peephole-table.cc because libv8_libbase.dylib not found

2016-10-18 Thread Jochen Eisinger
I'm surprised that the component build with gyp on mac ever worked for you,
it never did for me :-/

On Tue, Oct 18, 2016 at 5:32 AM Zac Hansen  wrote:

> manually copying the file into /usr/local/lib works.   Someone said it
> might have to do with the "install_name" being /usr/local/lib, but I don't
> really understand what this means.
>
> Also, it seems broken that copying a file into /usr/local is required for
> part of the build.
>
> --Zac
>
>
> On Monday, October 17, 2016 at 8:02:34 PM UTC-7, Zac Hansen wrote:
>
> I've been successfully building v8 for quite a while and recently pulled a
> new version and am getting the following error on os x el capitan:
>
> make library=shared snapshot=off x64.debug -j2
>
>   ACTION src_v8_gyp_v8_base_target_run_mkpeephole
> /Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc
>
> dyld: Library not loaded: /usr/local/lib/libv8_libbase.dylib
>
>   Referenced from: /Users/xaxxon/v8/out/x64.debug/mkpeephole
>
>   Reason: image not found
>
> /bin/sh: line 1: 18072
>  Trace/BPT trap: 5
>   "/Users/xaxxon/v8/out/x64.debug/mkpeephole"
> "/Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc"
>
> make[1]: ***
> [/Users/xaxxon/v8/out/x64.debug/obj.target/v8_base/geni/bytecode-peephole-table.cc]
> Error 133
>
> make: *** [x64.debug] Error 2
>
> I try setting my DYLD_LIBRARY_PATH to the recently build dylib but that
> doesn't seem to help and it still complains about it not being in
> /usr/local/lib...
>
> Any suggestions?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Building v8

2016-10-17 Thread Jochen Eisinger
support for compiling libplatform as a shared library landed a few days
ago. If you compile with the gn flag is_component_build = true, you should
get a shared library

On Sat, Oct 15, 2016 at 10:06 PM Temuri Imnaishvili <temuri...@gmail.com>
wrote:

> Jochen,
>
> Facing the same problem. Can you provide us with help on compiling it
> correctly?
>
> Thanks!
>
>
> On Tuesday, 20 September 2016 03:25:21 UTC-4, Jochen Eisinger wrote:
>
> If you want to build v8 with shared libraries, set the gn arg
> is_component_build=true
>
> Yes, we intend to update the embedder guide. Contributions or bug reports
> are always welcome!
>
> On Fri, Sep 16, 2016 at 7:43 PM Furious Scissors <furious...@gmail.com>
> wrote:
>
> Ok - i'll try and give that a shot. Are there any plans on upgrading the
> Embedded Guide to something more recent than v4.8?
> If I work this out - would I be able to contribute to the wiki to update
> it for everyone else?
>
>
> On Thursday, September 15, 2016 at 10:11:01 PM UTC-7, Jochen Eisinger
> wrote:
>
> by default, we build thin archives which are suitable for static linking
> against other apps, and yes, you will need the .o files around for that.
>
> If you'd rather have shared libraries (.so files), set the gn
> arg is_component_build = true
>
> br
> -jochen
>
> On Thu, Sep 15, 2016 at 5:07 PM Travis Sharp <furious...@gmail.com> wrote:
>
> I've followed the current instructions for building v8 with GN on
> https://github.com/v8/v8/wiki/Building%20with%20GN but after further
> inspection it looks as if the build only links the .o output instead of
> creating libraries for use in other applications.
>
> Am I missing a step or is this intended? I am trying to use the output
> library in another application.
>
> V8 Build-Head 5.4, Linux x64
>
> --
> --
> v8-users mailing list
>
> v8-u...@googlegroups.com
>
>
> 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 v8-users+u...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-u...@googlegroups.com
> 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 v8-users+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: How to build V8 on Linux using GCC instead of Clang?

2016-10-12 Thread Jochen Eisinger
I assume that CentOS 7 doesn't have the required libraries to compile the
latest version of V8.

On Tue, Oct 11, 2016 at 4:19 PM Ivan Pizhenko 
wrote:

> Tried this. I have following args.gn
>
> is_debug=true
> is_component_build=true
> target_cpu="x64"
> v8_target_cpu="x64"
> v8_postmortem_support=true
> is_clang=false
> use_sysroot=false
>
>
> and getting this error
>
> Package glib-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `glib-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'glib-2.0' found
> Package gmodule-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gmodule-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'gmodule-2.0' found
> Package gobject-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gobject-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'gobject-2.0' found
> Package gthread-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gthread-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'gthread-2.0' found
> Could not run pkg-config.
>
> I am trying to build on the CentOS 7.
> Updated OS with latest updates, installed package glib-devel.
> What else is missing?
>
>
> 2016-09-28 15:36 GMT+03:00 'Michael Achenbach' via v8-users <
> v8-users@googlegroups.com>:
>
> You need this in your args.gn:
> is_clang=false
> use_sysroot=false
>
>
> On Wednesday, September 28, 2016 at 2:15:47 AM UTC+2, Ivan P. wrote:
>
> Amendment: used ninja -v -C out.gn/test1
> So I can see all commands executed in console output, and I can see it
> uses clang++.
>
> среда, 28 сентября 2016 г., 3:13:02 UTC+3 пользователь Ivan P. написал:
>
> I have set up depot tools and checked out latest stable V8 version from
> latest stable Chromium (V8 ver. 5.3.332.45) like this.
>
> fetch v8
> cd v8
> git checkout -b mybranch 5.3.332.45
> gclient sync
>
> I have generated build files using
>
> gn args gn.out/test1
>
> and run build as
>
> ninja -C gn.out/test1
>
> and I can see that V8 is being built using clang++.
>
> I want to build using g++.
>
> What should be changed, please advise.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/l-atCAMVHZU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Temporary ObjectTemplate

2016-10-12 Thread Jochen Eisinger
depends on what you mean by wrapper. Typically, we'd call a JS object that
corresponds to an embedder object a "wrapper"

On Wed, Oct 12, 2016 at 12:28 AM Zac Hansen <xax...@gmail.com> wrote:

> why wouldn't you just use a v8::External?  Isn't that exactly what they're
> meant for?
>
>
> On Monday, October 10, 2016 at 5:08:54 AM UTC-7, Riccardo Corsi wrote:
>
> will do, thanks!
>
> On Fri, Oct 7, 2016 at 7:19 AM, Jochen Eisinger <joc...@chromium.org>
> wrote:
>
> If possible, reusing the object template will save space, and is preferable
>
> On Thu, Oct 6, 2016 at 8:18 PM Riccardo Corsi <riccard...@kairos3d.it>
> wrote:
>
> Hi all,
>
> I'm using ObjectTemplate to create JS empty objects that are simple
> wrappers of a c++ object
> (in the JS code they are just used as "handles" to pass the objects around
> in the script).
>
> I was just wondering if there is any issue or penalty to use a new
> ObjectTemplate every time (see code below)
> or if I should store the ObjectTemplate in a persistent handle and reuse
> it.
>
> Thank you,
> Ricky
>
> v8::Handle WrapNativeElem(NativeElem* elem)
>{
>   Isolate* isolate = Isolate::GetCurrent();
>   EscapableHandleScope handle_scope(isolate);
>
>   // create an empty object
>   v8::Handle elem_templ = v8::ObjectTemplate::New
> ();
>   elem_templ->SetInternalFieldCount(1);
>   v8::Local wrapper = elem_templ->NewInstance();
>
>   // set the game state as internal field and return the wrapper
>   wrapper->SetInternalField(0, External::New(Isolate::GetCurrent(),
> elem));
>   return handle_scope.Escape(wrapper);
>}
>
>
> --
> --
> v8-users mailing list
>
> v8-u...@googlegroups.com
> 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 v8-users+u...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
>
> v8-u...@googlegroups.com
>
>
> 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/GQmzqNKKDrQ/unsubscribe.
>
> To unsubscribe from this group and all its topics, send an email to
> v8-users+u...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How to retain or reacquire v8::ScriptCompiler::Source object?

2016-10-12 Thread Jochen Eisinger
you can get the ScriptOrigin from a v8::Function via GetScriptOrigin. You
can also ToString a function to get the source, but you could as well
create a global to the source.

On Wed, Oct 12, 2016 at 12:49 AM Zac Hansen  wrote:

> I'd like to keep around the data in a v8::ScriptCompiler::Source object,
> but I see it has v8::Local objects in it, which means I can't just make a
> Global out of it (right?).
>
> Is there some way to reacquire that object later or to keep it around
> indefinitely (outside of a handle scope)?
>
> Thank you.
>
> --Zac
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Temporary ObjectTemplate

2016-10-06 Thread Jochen Eisinger
If possible, reusing the object template will save space, and is preferable

On Thu, Oct 6, 2016 at 8:18 PM Riccardo Corsi 
wrote:

> Hi all,
>
> I'm using ObjectTemplate to create JS empty objects that are simple
> wrappers of a c++ object
> (in the JS code they are just used as "handles" to pass the objects around
> in the script).
>
> I was just wondering if there is any issue or penalty to use a new
> ObjectTemplate every time (see code below)
> or if I should store the ObjectTemplate in a persistent handle and reuse
> it.
>
> Thank you,
> Ricky
>
> v8::Handle WrapNativeElem(NativeElem* elem)
>{
>   Isolate* isolate = Isolate::GetCurrent();
>   EscapableHandleScope handle_scope(isolate);
>
>   // create an empty object
>   v8::Handle elem_templ = v8::ObjectTemplate::New
> ();
>   elem_templ->SetInternalFieldCount(1);
>   v8::Local wrapper = elem_templ->NewInstance();
>
>   // set the game state as internal field and return the wrapper
>   wrapper->SetInternalField(0, External::New(Isolate::GetCurrent(),
> elem));
>   return handle_scope.Escape(wrapper);
>}
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Weak callback for function callback data never getting called

2016-10-04 Thread Jochen Eisinger
the function template won't ever get gc'd after you've instantiated it once.

On Wed, Oct 5, 2016 at 12:56 AM Zac Hansen <xax...@gmail.com> wrote:

> Put your inner block in a tight loop and throw in a
> http://v8.paulfryzel.com/docs/master/classv8_1_1_isolate.html#aaeda5fa60961a3d9d476c46200e30711
>
> isolate->AdjustAmountOfExternalAllocatedMemory(100)
>
> in there too and see what happens.
>
>
> On Tue, Oct 4, 2016 at 3:48 PM, Theodore Dubois <tbl...@icloud.com> wrote:
>
> I created the FunctionTemplate inside its own HandleScope which gets
> destroyed before the program finishes, so it should get garbage collected
> before the end of the program. Is that right?
>
> ~Theodore
>
>
> On Oct 4, 2016, at 3:45 PM, Zac Hansen <xax...@gmail.com> wrote:
>
> The way I read it is that because the function template remains until the
> end of the program, its data cannot be cleaned up.  And since it has to
> keep str around until the function template goes away, str won't be cleaned
> up either because there's still a reference to it.
>
> On Tue, Oct 4, 2016 at 2:19 PM, Theodore Dubois <tbl...@icloud.com> wrote:
>
> Interesting. So when a function template is created, its callback data
> will never be freed?
>
> ~Theodore
>
> On Oct 4, 2016, at 1:17 AM, Jochen Eisinger <joc...@chromium.org> wrote:
>
> v8 has an per-isolate cache of function templates. As the string is
> referenced by the function template, it will never go out of scope.
>
> I'd recommend to create a weak handle to the function you create via
> GetFunction() instead
>
> On Mon, Oct 3, 2016 at 12:27 PM Pavel Medvedev <pmedve...@gmail.com>
> wrote:
>
> Hi  Theodore,
>
> In this program, weak_callback never gets called. Anyone know why?
>
>
> There is no isolate->Enter() after Isolate::New(params), and no
> context->Enter() after Context::New(isolate). May it be a reason?
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/Rshbi2HKYCM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/Rshbi2HKYCM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/Rshbi2HKYCM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/Rshbi2HKYCM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.

Re: [v8-users] Re: Building V8 on FreeBSD

2016-10-04 Thread Jochen Eisinger
If you run the mb.py command directly (python -u tools/mb/mb.py gen -f
infra/mb/mb_config.pyl -m developer_default -b x64.release
out.gn/x64.release) does it print a more verbose error message?

On Tue, Oct 4, 2016 at 9:17 PM Jose Madrigal  wrote:

> I been trying follow the instructions shown in
> https://github.com/v8/v8/wiki/Building%20with%20GN
>
> At the point where I must use:
>
>  > tools/dev/v8gen.py x64.release
>
> raise a error:
>
> Traceback (most recent call last):
>   File "tools/dev/v8gen.py", line 304, in 
> sys.exit(gen.main())
>   File "tools/dev/v8gen.py", line 298, in main
> return self._options.func()
>   File "tools/dev/v8gen.py", line 166, in cmd_gen
> gn_outdir,
>   File "tools/dev/v8gen.py", line 208, in _call_cmd
> stderr=subprocess.STDOUT,
>   File "/usr/local/lib/python2.7/subprocess.py", line 573, in check_output
> raise CalledProcessError(retcode, cmd, output=output)
> subprocess.CalledProcessError: Command '['/usr/local/bin/python', '-u',
> 'tools/mb/mb.py', 'gen', '-f', 'infra/mb/mb_config.pyl', '-m',
> 'developer_default', '-b', 'x64.release', 'out.gn/x64.release']' returned
> non-zero exit status 1
>
>
> Any ideas ?
>
>
> El martes, 4 de octubre de 2016, 10:57:18 (UTC-5), Jose Madrigal escribió:
>
> Hello !!!
>
> I been trying to build V8 on FreeBSD due the ports are not updated to the
> recent version of v8 but I have struggled a lot. I wonder if someone
> already build v8 on FreeBSD that could point me out in the right direction
> to achieve it.
>
> Thanks in advance !!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] linking error while building V8 for Android device using GN and Ninja

2016-09-28 Thread Jochen Eisinger
did you install the arm64 sysroot?

On Wed, Sep 21, 2016 at 9:33 AM Yakir E  wrote:

> Hi all,
> I am trying in the last few days to build V8 for Android. I am using
> Ubuntu 64bit as the build machine. After a lot of tries I was able to make
> ninja to start the build but after compiling few hundreds of files I get
> the following linking error
>
> *unrecognised emulation mode: aarch64linux*
>
> my GN args file is
>
>
>
> *target_os = "android"target_cpu = "arm64"is_debug = falseis_clang = true*
>
> I guess the first issue is that instead of trying to build the lib for
> device it trying to build an emulation build but I don't really understand
> why it does that since I asked for Android arm64.
>
> Please advice,
> Thanks
> Yakir
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Disabling All Of The Optimizations

2016-09-27 Thread Jochen Eisinger
sorry, no idea.

On Mon, Sep 26, 2016 at 9:01 AM PhistucK <phist...@gmail.com> wrote:

> Yes, but I could not provide a reproduction case. :(
> At least not without approvals from managers, I guess.
>
> Do you happen to know when the next stable patch release is planned (that
> includes the change)? I had to instruct the test teams to use
> --js-flags="--no-crankshaft" for now, which is not ideal...
>
>
> ☆*PhistucK*
>
> On Mon, Sep 26, 2016 at 9:42 AM, Jochen Eisinger <joc...@chromium.org>
> wrote:
>
> Thanks for tracking this down. In general, if you're willing / able to
> provide a repro case, we're happy to investigate suchs bugs ourselves, so
> you don't have to go through the trouble of bisecting this..
>
> On Sun, Sep 25, 2016 at 6:06 PM PhistucK <phist...@gmail.com> wrote:
>
> After bisecting, the bug started at -
> https://chromium.googlesource.com/v8/v8/+log/c93d868f..d83c3f0e
> The bug stopped at -
> https://chromium.googlesource.com/v8/v8/+log/f9a47d47..a255aa83
>
> This leaves me with
> https://chromium.googlesource.com/v8/v8/+/4dab7b5a1d6722002d47d0be2481cb65602a2451,
> which resolves a for-in optimization (Turbofan) bug
> <https://bugs.chromium.org/p/chromium/issues/detail?id=647887> and
> already merged to the 5.3 branch (but is not released to stable yet :().
>
> Though, I wonder, why did it not always occur? jQuery.isPlainObject is a
> very hot function (at least in the code with which I am dealing here). Is
> it possible that it is not always optimized?
> (Also, that weird foo.hasOwnProperty(bar) === true versus 
> Object.keys(foo).indexOf(bar)
> === -1 contradiction...)
>
> Hopefully, another stable patch will be released soon, as it may affect
> many jQuery versions, since that was the way to check whether an object is
> a plain object until some time ago.
>
> I apologize to everyone, as I experienced the bug when it started but
> dismissed it as a temporary canary issue that would resolve itself. Stupid
> me. I hope I learned my lesson (probably not, though :( - I would have
> reported it if it did not require days of investigations).
>
>
> ☆*PhistucK*
>
> On Sat, Sep 24, 2016 at 1:45 PM, PhistucK <phist...@gmail.com> wrote:
>
> Thank you! Unfortunately, for everyone, it is getting clearer and clearer
> that this is an optimization issue. The issue does not reproduce with the
> --no-crankshaft flag.
>
> The code is calling something like -
> jQuery.extend(/* deepCopy */ true, {string: 'something'}, {string,
> 'something', instance: someConstructedInstance})
> (Where someConstructedInstance is a an instance of an object based on an
> enhanced Backbone View Model, so it is not a plain object)
> And sometimes (it used to occasionally appear, it now appears most often
> than not), jQuery.isPlainObject returns true for the value of instance.
> That jQuery function finishes with the following statements
> <https://github.com/jquery/jquery/blob/d71f6a53927ad02d728503385d15539b73d21ac8/src/core.js#L472-L475>
>  -
> var key;
> for ( key in obj ) {}
>
> return key === undefined || core_hasOwn.call( obj, key );
> From my debugging, it sometimes fails the key === undefined
> <https://github.com/jquery/jquery/blob/d71f6a53927ad02d728503385d15539b73d21ac8/src/core.js#L475>
> check (if I add more logging code, it returns true - that does not make
> sense) and it sometimes fails the core_hasOwn.call( obj, key )
> <https://github.com/jquery/jquery/blob/d71f6a53927ad02d728503385d15539b73d21ac8/src/core.js#L475>
> check (which returns true for a key that is not an own property). When
> this happen, Object.keys(obj).indexOf(key) returns -1. I verified that
> the key is indeed not an own property.
> (I am using jQuery 1.9.1 and cannot update it, but the code has basically
> gone through simplification, not real bug fixes)
>
> I think it may have started since Chrome 52, I am not sure. It evidently
> possibly became much, much worse in Chrome 53 (Windows 7, Intel Core i5, 32
> bit).
>
> I should report it, but I cannot disclose the code (it is a
> several-megabyte package that includes - and uses in that stack - several
> libraries like Knockout, Backbone, Underscore and more). Can someone
> suggest how I can diagnose and debug this further (without a native code
> debugger) in order to help you understand the exact issue (without showing
> code :()?
>
>
> ☆*PhistucK*
> On Tuesday, September 20, 2016 at 3:54:19 PM UTC+3, Michael Hablich wrote:
>
> --no-crankshaft should do the trick. The name is misleading, it will also
> disable TurboFan.
>
>
> On Tuesday, September 20, 2016 at 1:51:51 PM UTC+2, PhistucK wrote:
>
> I have an issue where the co

Re: [v8-users] No libv8.a generated for either X64 or ARM64 build.

2016-09-27 Thread Jochen Eisinger
Currently, we don't create an .a file, but assume that the embedding app
also uses gn which would then just pass the list of all object files on. I
filed https://bugs.chromium.org/p/v8/issues/detail?id=5435 to track this
issue in general

On Mon, Sep 26, 2016 at 10:21 PM Nonny Mouse  wrote:

> I'm trying to build V8 for both X64 and ARM64 (by cross compiling).  Both
> builds seem to run and complete without errors, but libv8.a, libplatform.a,
> etc. are not generated for either build.  However, other static libraries
> are successfully built (e.g. libgmock.a).
>
> Build machine is X64 running Mint 17.3 (i.e. Ubuntu 14.04LTS).  To be
> certain, I created a new v8 directory and downloaded and built everything
> again with the following:
>
>  git clone
> https://chromium.googlesource.com/chromium/tools/depot_tools.git
>  export (correct path, beginning with depot_tools)
>  fetch v8;  cd v8
>  build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
>  gclient sync
>
>  then:
>
>  gn gen out/a64 --args='is_debug=false symbol_level=0
> v8_use_external_startup_data=false v8_enable_i18n_support=false
> target_cpu="arm64"'
>  ninja -C out/a64 | tee out/a64/build.log
>
> (The only difference between the X64 and ARM64 builds was the target_cpu
> and out directory).
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Getting invalid (very high) line numbers from failed compile within v8::ScriptCompiler::CompileFunctionInContext

2016-09-26 Thread Jochen Eisinger
CompileFunctionInContext is equivalent to using with (context_extension) {
} around your function which is different from pretending it was inside
some other function.

As for the odd line numbers, can you provide a complete repro case?

On Sat, Sep 24, 2016 at 1:12 PM Zac Hansen  wrote:

> I'm a bit confused.   I put a proper TryCatch around the
> CompileFunctionInContext and print the results there and I get a much
> better error:
>
> 0
> myfile.js:74: SyntaxError: Unexpected identifier
> do_stuff: function(stuff){
>   
>
> because I'm missing a comma on the preceeding line.
>
> But what the heck was going on before?
>
>
> On Saturday, September 24, 2016 at 2:41:29 AM UTC-7, Zac Hansen wrote:
>
> I'm trying to take some user-provided code and pretend it's inside of a
> function, which is what I
> think v8::ScriptCompiler::CompileFunctionInContext is for.
>
> However, I have a syntax error in my javascript code, but when I get an
> error message:
>
> myfile.js:2079: Uncaught SyntaxError: Unexpected identifier
>
> there is no line 2079.  that specific file only has 372 lines and the
> actual failure is probably around line 85 or so.  If I look at my
> ScriptOrigin right before I start compiling, it all seems good with the
> right filename, line, and column offsets (1, 0 respectively).
>
> printf("%s\n", *v8::String::Utf8Value(script_origin.ResourceName()));
> printf("%d\n", script_origin.ResourceLineOffset()->Value());
> printf("%d\n", script_origin.ResourceColumnOffset()->Value());
>
>
> v8::ScriptCompiler::Source source(v8::String::NewFromUtf8(isolate, 
> module_source.c_str()), script_origin);
> v8::Local parameter_names[] = {
> v8::String::NewFromUtf8(isolate, "module"),
> v8::String::NewFromUtf8(isolate, "exports")
> };
> auto maybe_module_function =
> v8::ScriptCompiler::CompileFunctionInContext(context, , 2, 
> _names[0], 0, nullptr);
>
>
> Any ideas?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Disabling All Of The Optimizations

2016-09-26 Thread Jochen Eisinger
Thanks for tracking this down. In general, if you're willing / able to
provide a repro case, we're happy to investigate suchs bugs ourselves, so
you don't have to go through the trouble of bisecting this..

On Sun, Sep 25, 2016 at 6:06 PM PhistucK  wrote:

> After bisecting, the bug started at -
> https://chromium.googlesource.com/v8/v8/+log/c93d868f..d83c3f0e
> The bug stopped at -
> https://chromium.googlesource.com/v8/v8/+log/f9a47d47..a255aa83
>
> This leaves me with
> https://chromium.googlesource.com/v8/v8/+/4dab7b5a1d6722002d47d0be2481cb65602a2451,
> which resolves a for-in optimization (Turbofan) bug
>  and
> already merged to the 5.3 branch (but is not released to stable yet :().
>
> Though, I wonder, why did it not always occur? jQuery.isPlainObject is a
> very hot function (at least in the code with which I am dealing here). Is
> it possible that it is not always optimized?
> (Also, that weird foo.hasOwnProperty(bar) === true versus 
> Object.keys(foo).indexOf(bar)
> === -1 contradiction...)
>
> Hopefully, another stable patch will be released soon, as it may affect
> many jQuery versions, since that was the way to check whether an object is
> a plain object until some time ago.
>
> I apologize to everyone, as I experienced the bug when it started but
> dismissed it as a temporary canary issue that would resolve itself. Stupid
> me. I hope I learned my lesson (probably not, though :( - I would have
> reported it if it did not require days of investigations).
>
>
> ☆*PhistucK*
>
> On Sat, Sep 24, 2016 at 1:45 PM, PhistucK  wrote:
>
> Thank you! Unfortunately, for everyone, it is getting clearer and clearer
> that this is an optimization issue. The issue does not reproduce with the
> --no-crankshaft flag.
>
> The code is calling something like -
> jQuery.extend(/* deepCopy */ true, {string: 'something'}, {string,
> 'something', instance: someConstructedInstance})
> (Where someConstructedInstance is a an instance of an object based on an
> enhanced Backbone View Model, so it is not a plain object)
> And sometimes (it used to occasionally appear, it now appears most often
> than not), jQuery.isPlainObject returns true for the value of instance.
> That jQuery function finishes with the following statements
> 
>  -
> var key;
> for ( key in obj ) {}
>
> return key === undefined || core_hasOwn.call( obj, key );
> From my debugging, it sometimes fails the key === undefined
> 
> check (if I add more logging code, it returns true - that does not make
> sense) and it sometimes fails the core_hasOwn.call( obj, key )
> 
> check (which returns true for a key that is not an own property). When
> this happen, Object.keys(obj).indexOf(key) returns -1. I verified that
> the key is indeed not an own property.
> (I am using jQuery 1.9.1 and cannot update it, but the code has basically
> gone through simplification, not real bug fixes)
>
> I think it may have started since Chrome 52, I am not sure. It evidently
> possibly became much, much worse in Chrome 53 (Windows 7, Intel Core i5, 32
> bit).
>
> I should report it, but I cannot disclose the code (it is a
> several-megabyte package that includes - and uses in that stack - several
> libraries like Knockout, Backbone, Underscore and more). Can someone
> suggest how I can diagnose and debug this further (without a native code
> debugger) in order to help you understand the exact issue (without showing
> code :()?
>
>
> ☆*PhistucK*
> On Tuesday, September 20, 2016 at 3:54:19 PM UTC+3, Michael Hablich wrote:
>
> --no-crankshaft should do the trick. The name is misleading, it will also
> disable TurboFan.
>
>
> On Tuesday, September 20, 2016 at 1:51:51 PM UTC+2, PhistucK wrote:
>
> I have an issue where the code suddenly (since Chrome 53) gets caught up
> in a cyclic recursion until it exceeds the stack size limit.
>
> Since the code is the same, I want to try and rule out engine optimization
> issues. Is there a V8 flag for disabling all of the optimizations?
>
>
> ☆*PhistucK*
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/V3J9CwEv468/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 

Re: [v8-users] Building v8 with gn.

2016-09-22 Thread Jochen Eisinger
On Thu, Sep 22, 2016 at 1:22 AM Jane Chen  wrote:

> Trying to build v8 5.3-lkgr with gn for embedding use.
>
> When I build with GYP, I need to set "-Dv8_use_external_startup_data=0".
> Is there an equivalent setting flag for gn?
>

the equivalent gn setting is v8_use_external_startup_data = false


> Also if I build with gn and I need to link with libv8_libplatform.a,
> libv8_libbase.a etc, is there a flag to generate those static libs?
>
>
those should be generated automatically when compiling v8


> Thanks!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Building v8 with Visual Studio 2015 on Windows 10

2016-09-21 Thread Jochen Eisinger
If you want to build with MSVS, you need the msvs gyp generator. msvs-ninja
only supports browsing the project, not building it

On Tue, Sep 20, 2016 at 10:04 AM Pieter  wrote:

>
> I have been struggling for a couple of days to get the correct
> incantations to get a build of v8 working on windows 10 with visual studio
> 2015.
>
> In short the steps that i've been attempting are as follows
>
>- set DEPOT_TOOLS_WIN_TOOLCHAIN=0
>- set GYP_MSVS_VERSION=2015
>- set GYP_GENERATORS=msvs-ninja,ninja
>- Get depot tools from: wget
>https://storage.googleapis.com/chrome-infra/depot_tools.zip -OutFile
>depot_tools.zip
>- Expand Archive: Expand-Archive .\depot_tools.zip -dest depot_tools
>- Set the path for depot tools
>- Checkout the v8 source code by running: fetch v8
>- Change directory to /v8 and checkout 5.2: git checkout
>branch-heads/5.2
>- Run sync so that all the dependencies are up to date with the
>branch: gclient sync
>- To generate the project files run: third_party/python_26/python.exe
>build\gyp_v8 -Dtarget_arch=x64
>- To build: : "c:\Program Files (x86)\Microsoft Visual Studio
>14.0\Common7\IDE\devenv.com" /build Release gypfiles\All.sln
>
> I am running into all kinds of issues related with the build and after
> running the last command it ends with
>
> The first occurrence of the error is
>
> 1>  ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft
> Visual Studio 14.0\VC\bin\amd64\cl.exe" /nologo /showIncludes /FC @obj\
> third_party\icu\source\i18n\icui18n.collationkeys.obj.rsp /c..\..\
> third_party\icu\source\i18n\collationkeys.cpp /Foobj\third_party\icu\
> source\i18n\icui18n.collationkeys.obj /Fdobj\third_party\icu\icui18n.cc.
> pdb
> 1>C:\source\v8build\v8\third_party\icu\source\i18n\collationkeys.cpp : fatal
> error C1083: Cannot open compiler generated file:
> 'C:\source\v8build\v8\out\Release_x64\obj\third_party\icu\source\i18n\icui18n.collationkeys.obj'
> : Permission denied
>
> I am not sure why i'm getting a permission denied.
>
> the build then ends with
>
> 40>  ninja: build stopped: subcommand failed.
> 40>ninja : warning : premature end of file; recovering
> 40>C:\source\v8build\v8\test\fuzzer\wasm_fuzzer.vcxproj(334,5): error
> MSB3073: The command "call ninja.exe -C ..\..\out\Release_x64\
> wasm_fuzzer" exited with code 1.
>
>  ..\..\out\Release_x64\ wasm_fuzzer" exited with code 1.
> == Build: 20 succeeded, 21 failed, 0 up-to-date, 0 skipped
> ==
>
>
> Any help would be much appreciated
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Undefined reference to `v8::platform::CreateDefaultPlatform(int)`

2016-09-21 Thread Jochen Eisinger
I filed https://bugs.chromium.org/p/v8/issues/detail?id=5412 as feature
request

On Wed, Sep 21, 2016 at 10:50 AM Jochen Eisinger <joc...@chromium.org>
wrote:

> libplatform currently does not support dynamic linking.
>
> On Tue, Sep 20, 2016 at 7:43 PM Andre Cunha <andre.lv.cu...@gmail.com>
> wrote:
>
> Hello,
>
> I'm trying to dynamically load libplatform in an application I'm writing.
> I searched through the available gn options, but I couldn't find an option
> to build libplatform as a shared object, so I did it by hand:
>
> $ gcc -shared -o libv8_libplatform.so obj/v8_lib{platform,base}/*.o
>
> I use this both in debug and in release mode, but when I link my
> application against libplatform in release mode, I get "undefined reference
> to `v8::platform::CreateDefaultPlatform(int)`". This doesn't happen in
> debug mode. After some investigation, I realized that the aforementioned
> function is exported in debug mode, but is hidden in release mode:
>
> # Debug
> $ nm -C libv8_libplatform.so | grep CreateDefaultPlatform
> 0001ad70 *T* v8::platform::CreateDefaultPlatform(int)
>
> # Release
> $ nm -C libv8_libplatform.so | grep CreateDefaultPlatform
> 3b20 *t* v8::platform::CreateDefaultPlatform(int)
>
> I inspected the ninja files, and realized this happens because object
> files are compiled with -fvisibility=default in debug mode, and with
> -fvisibility=hidden in release mode.
>
> So, my question is: is this function not supposed to be used in release
> applications? Should I, then, link statically against the many individual
> .o files needed (as the hello-world.cc example does)? If so, what's the
> best way to do this?
>
> Thanks in advance,
> Andre
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Undefined reference to `v8::platform::CreateDefaultPlatform(int)`

2016-09-21 Thread Jochen Eisinger
libplatform currently does not support dynamic linking.

On Tue, Sep 20, 2016 at 7:43 PM Andre Cunha 
wrote:

> Hello,
>
> I'm trying to dynamically load libplatform in an application I'm writing.
> I searched through the available gn options, but I couldn't find an option
> to build libplatform as a shared object, so I did it by hand:
>
> $ gcc -shared -o libv8_libplatform.so obj/v8_lib{platform,base}/*.o
>
> I use this both in debug and in release mode, but when I link my
> application against libplatform in release mode, I get "undefined reference
> to `v8::platform::CreateDefaultPlatform(int)`". This doesn't happen in
> debug mode. After some investigation, I realized that the aforementioned
> function is exported in debug mode, but is hidden in release mode:
>
> # Debug
> $ nm -C libv8_libplatform.so | grep CreateDefaultPlatform
> 0001ad70 *T* v8::platform::CreateDefaultPlatform(int)
>
> # Release
> $ nm -C libv8_libplatform.so | grep CreateDefaultPlatform
> 3b20 *t* v8::platform::CreateDefaultPlatform(int)
>
> I inspected the ninja files, and realized this happens because object
> files are compiled with -fvisibility=default in debug mode, and with
> -fvisibility=hidden in release mode.
>
> So, my question is: is this function not supposed to be used in release
> applications? Should I, then, link statically against the many individual
> .o files needed (as the hello-world.cc example does)? If so, what's the
> best way to do this?
>
> Thanks in advance,
> Andre
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Building v8

2016-09-20 Thread Jochen Eisinger
If you want to build v8 with shared libraries, set the gn arg
is_component_build=true

Yes, we intend to update the embedder guide. Contributions or bug reports
are always welcome!

On Fri, Sep 16, 2016 at 7:43 PM Furious Scissors <furioussciss...@gmail.com>
wrote:

> Ok - i'll try and give that a shot. Are there any plans on upgrading the
> Embedded Guide to something more recent than v4.8?
> If I work this out - would I be able to contribute to the wiki to update
> it for everyone else?
>
>
> On Thursday, September 15, 2016 at 10:11:01 PM UTC-7, Jochen Eisinger
> wrote:
>
> by default, we build thin archives which are suitable for static linking
> against other apps, and yes, you will need the .o files around for that.
>
> If you'd rather have shared libraries (.so files), set the gn
> arg is_component_build = true
>
> br
> -jochen
>
> On Thu, Sep 15, 2016 at 5:07 PM Travis Sharp <furious...@gmail.com> wrote:
>
> I've followed the current instructions for building v8 with GN on
> https://github.com/v8/v8/wiki/Building%20with%20GN but after further
> inspection it looks as if the build only links the .o output instead of
> creating libraries for use in other applications.
>
> Am I missing a step or is this intended? I am trying to use the output
> library in another application.
>
> V8 Build-Head 5.4, Linux x64
>
> --
> --
> v8-users mailing list
>
> v8-u...@googlegroups.com
>
>
> 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 v8-users+u...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Problem getting V8 sources

2016-09-20 Thread Jochen Eisinger
To get dll files, you'll need to set component=shared_library in your
GYP_DEFINES env variable, or set is_component_build = true in your gn args,
depending on which build system you use.

On Mon, Sep 19, 2016 at 6:11 AM Ivan Pizhenko 
wrote:

> Thank you Pavel. This may be useful for me.
>
> 2016-09-18 10:45 GMT+03:00 Pavel Medvedev :
>
> Hi Ivan,
>
> I may suggest to try pre-built Nuget packages for V8:
>
> https://www.nuget.org/packages/v8-v120-x86/
> https://www.nuget.org/packages/v8-v120-x64/
> https://www.nuget.org/packages/v8-v140-x86/
> https://www.nuget.org/packages/v8-v140-x64/
>
> I have created them recently in order to manage V8 build issues on Windows.
>
> I use GYP in a Python script to build V8 libraries and Nuget packages, as
> you can see at https://github.com/pmed/v8-nuget
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/sY-ToMUC_4I/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Need to re-run gn for build options to take effect

2016-09-20 Thread Jochen Eisinger
v8gen creates the input for gn. gn creates the input for ninja. ninja
builds the binaries.

You can use gn gen out.gn/x64.release instead of gn args if you don't
intend to change the args anyways.

best
-jochen

On Mon, Sep 19, 2016 at 9:19 PM Andre Cunha 
wrote:

> PS: the same behavior applies to i18n support in debug mode. When I run
> v8gen.py with "v8_enable_i18n_support=false", the build process still
> generates libraries that depend on ICU. I need to run gn and ninja again to
> get rid of the dependency.
>
> On Monday, September 19, 2016 at 3:55:08 PM UTC-3, Andre Cunha wrote:
>
> Hello,
>
> I'm building v8 5.4 using the following commands (Ubuntu 14.04, x64):
>
> $ fetch v8
> $ cd v8
> $ git checkout remotes/branch-heads/5.4
> $ gclient sync
> $ tools/dev/v8gen.py x64.release -- is_component_build=true
> v8_enable_i18n_support=false
> $ ninja -C out.gn/x64.release
>
> However, when I do this, libv8.so is *not* generated in out.gn/x64.release.
> In order for it to be generated, I need to do:
>
> $ gn args out.gn/x64.release
> # Close vi (no need to save).
> $ ninja -C out.gn/x64.release
>
> Then, 851 files are (re)compiled and libv8.so is generated.
>
> Why do I need to re-run gn for the options to take effect? Am I missing
> some step in the building process?
>
> Thank you!
> Andre
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Problem getting V8 sources

2016-09-16 Thread Jochen Eisinger
t; ar.gz.sha1' took 14.25 secs
>
>  running 'L:\depot_tools\python276_bin\python.exe
> v8/build/linux/sysroot_scripts/install-sysroot.py --running-as
> -hook' in 'L:\v8-build'
>
>  running 'L:\depot_tools\python276_bin\python.exe
> v8/third_party/instrumented_libraries/scripts/download_binarie
> s.py' in 'L:\v8-build'
>
>  running 'L:\depot_tools\python276_bin\python.exe
> v8/gypfiles/vs_toolchain.py update' in 'L:\v8-build'
>
>  running 'L:\depot_tools\python276_bin\python.exe
> v8/third_party/binutils/download.py' in 'L:\v8-build'
>
>  running 'L:\depot_tools\python276_bin\python.exe
> v8/gypfiles/download_gold_plugin.py' in 'L:\v8-build'
> Gold plugin download not supported on windows.
>
>  running 'L:\depot_tools\python276_bin\python.exe
> v8/tools/clang/scripts/update.py --if-needed' in 'L:\v8-build'
>
>
>  running 'L:\depot_tools\python276_bin\python.exe
> v8/gypfiles/gyp_v8 --running-as-hook' in 'L:\v8-build'
> GYP is now disabled by default in runhooks.
>
> If you really want to run this, either run
> `python gypfiles/gyp_v8` explicitly by hand
> or set the environment variable GYP_CHROMIUM_NO_ACTION=0.
>
>
>
> 2016-09-16 8:07 GMT+03:00 Jochen Eisinger <joc...@chromium.org>:
>
> Please set the env variable DEPOT_TOOLS_WIN_TOOLCHAIN to 0 and try again
>
> On Thu, Sep 15, 2016 at 3:44 PM Ivan Pizhenko <ivan.pizhe...@gmail.com>
> wrote:
>
> Actually, differs a bit but still similar to previous one.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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/sY-ToMUC_4I/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Modules and TypeScript in plain V8 embedding Project

2016-09-15 Thread Jochen Eisinger
V8 itself doesn't support typescript, you'll have to compile your sources
to javascript first. We're currently working on native module support, but
that's not yet ready for use, so if you want modules, you will need to
implement a module loader yourself (as e.g. node.js does)

On Thu, Sep 15, 2016 at 5:55 PM  wrote:

> Hello,
>
> I try to embed V8 into a C/C++ program. I want to use TypeScript but I'm
> not shure if it is possible to do so in bare V8. I know it is possible in
> Node.js but I'm not sure if it is possible for V8 only.
> I also want to use "require" or "import" or the like to create modules and
> use them at runtime. Everything that I found seems to require a browser or
> Node.js (Common.js, Require.js, ...). Also TypeScript wants to translate
> its modules into one of those standard APIs.
> It does not seem easy to implement a correct self-made module system.
>
> Can anybody point me in the right direction? Is it is possible to use
> TypeScript and modules in bare V8 in an embedding scenario? And if it is,
> are there any resources where I can find further information?
>
> Any help is appreciated.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Building v8

2016-09-15 Thread Jochen Eisinger
by default, we build thin archives which are suitable for static linking
against other apps, and yes, you will need the .o files around for that.

If you'd rather have shared libraries (.so files), set the gn
arg is_component_build = true

br
-jochen

On Thu, Sep 15, 2016 at 5:07 PM Travis Sharp 
wrote:

> I've followed the current instructions for building v8 with GN on
> https://github.com/v8/v8/wiki/Building%20with%20GN but after further
> inspection it looks as if the build only links the .o output instead of
> creating libraries for use in other applications.
>
> Am I missing a step or is this intended? I am trying to use the output
> library in another application.
>
> V8 Build-Head 5.4, Linux x64
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Problem getting V8 sources

2016-09-15 Thread Jochen Eisinger
Please set the env variable DEPOT_TOOLS_WIN_TOOLCHAIN to 0 and try again

On Thu, Sep 15, 2016 at 3:44 PM Ivan Pizhenko 
wrote:

> Actually, differs a bit but still similar to previous one.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Problem getting V8 sources

2016-09-15 Thread Jochen Eisinger
If you manually run L:\\depot_tools\\python276_bin\\python.exe
v8/gypfiles/landmines.py what error message do you get?

On Wed, Sep 14, 2016 at 4:11 PM Ivan P.  wrote:

> I am attempting to get V8 sources to build on Windows, using VS2013. OS is
> Win2008 Server R2 x64.
> I have downloaded and updated depot_tools.
>
> Then I have started new cmd shell and did following:
>
> L:\>path L:\depot_tools;%PATH%
>
> L:\>mkdir v8-build
>
> L:\>cd v8-build
>
> L:\v8-build>fetch v8
> Running: 'L:\depot_tools\python276_bin\python.exe'
> 'L:\depot_tools\gclient.py' root
> Running: 'L:\depot_tools\python276_bin\python.exe'
> 'L:\depot_tools\gclient.py' config --spec 'solutions = [
>   {
> "managed": False,
> "name": "v8",
> "url": "https://chromium.googlesource.com/v8/v8.git;,
> "custom_deps": {},
> "deps_file": "DEPS",
> "safesync_url": "",
>   },
> ]
> '
> Running: 'L:\depot_tools\python276_bin\python.exe'
> 'L:\depot_tools\gclient.py' sync --with_branch_heads
> Error: Command 'L:\\depot_tools\\python276_bin\\python.exe
> v8/gypfiles/landmines.py' returned non-zero exit status 1 in
> L:\v8-build
> Traceback (most recent call last):
>   File "L:\depot_tools\\fetch.py", line 353, in 
> sys.exit(main())
>   File "L:\depot_tools\\fetch.py", line 348, in main
> return run(options, spec, root)
>   File "L:\depot_tools\\fetch.py", line 342, in run
> return checkout.init()
>   File "L:\depot_tools\\fetch.py", line 142, in init
> self.run_gclient(*sync_cmd)
>   File "L:\depot_tools\\fetch.py", line 76, in run_gclient
> return self.run(cmd_prefix + cmd, **kwargs)
>   File "L:\depot_tools\\fetch.py", line 66, in run
> return subprocess.check_output(cmd, **kwargs)
>   File "L:\depot_tools\python276_bin\lib\subprocess.py", line 573, in
> check_output
> raise CalledProcessError(retcode, cmd, output=output)
> subprocess.CalledProcessError: Command
> '('L:\\depot_tools\\python276_bin\\python.exe',
> 'L:\\depot_tools\\gclient.py', 'sync', '--with_branch_heads')' returned
> non-zero exit status 2
>
> What this error means and how to get rid of it?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Build v8 with VS2015 and use prefered v8 version

2016-09-13 Thread Jochen Eisinger
You can also manually download all dependencies, but that's not documented,
so yes, it's pretty much fetch only

Raefaldhi Amartya Junior  schrieb am Mi., 14.
Sep. 2016, 03:11:

> So i must use fetch v8, no other way?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Build v8 with VS2015 and use prefered v8 version

2016-09-13 Thread Jochen Eisinger
Please follow these steps:
https://github.com/v8/v8/wiki/Building%20with%20GN

If you want to use a specific version, you can check out that branch / tag
and re-run gclient sync

On Tue, Sep 13, 2016 at 3:16 AM Raefaldhi Amartya Junior <
raefaldhiamar...@gmail.com> wrote:

> How to build prefered v8 version?
>
> Here is my step:
>
> 1. Download v8- 5.3.332.43 from here:
> https://github.com/v8/v8/releases/5.3.332.43
> 2. Unzip
> 3. cd /d v8- 5.3.332.43
> 4. gn args out.gn/foo
>
> I got error:
> gn.py: Could not find any checkout in any parent of the current path.
> This must be run inside checkout.
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] GN cross build from X64 to ARM64

2016-09-13 Thread Jochen Eisinger
It looks like you don't have the aarch64 toolchain installed, so you can't
cross compile.

On Tue, Sep 13, 2016 at 1:42 AM Nonny Mouse  wrote:

> I've been using V8 on X64 Linux for several years, but not previously
> building with GN.  For the future, I want to use the same version of V8,
> under Linux, on both X64 and ARM64 (have a working development board with
> Ubuntu Linux up and running).
>
> After fetch(ing) the current source, I have no problem building the X64
> version.  Using identical GN options (except "target_cpu=arm64") the Ninja
> build fails half way through with the following:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *[619/1394] AR obj/build/config/sanitizers/liboptions_sources.aFAILED:
> obj/build/config/sanitizers/liboptions_sources.a python
> "../../build/toolchain/gcc_ar_wrapper.py"
> --output=obj/build/config/sanitizers/liboptions_sources.a
> --ar="aarch64-linux-gnu-ar"  rcsD
> @"obj/build/config/sanitizers/liboptions_sources.a.rsp"Traceback (most
> recent call last):  File "../../build/toolchain/gcc_ar_wrapper.py", line
> 66, in sys.exit(main())  File
> "../../build/toolchain/gcc_ar_wrapper.py", line 62, in mainreturn
> subprocess.call(wrapper_utils.CommandToRun(command))  File
> "/usr/lib/python2.7/subprocess.py", line 522, in callreturn
> Popen(*popenargs, **kwargs).wait()  File
> "/usr/lib/python2.7/subprocess.py", line 710, in __init__errread,
> errwrite)  File "/usr/lib/python2.7/subprocess.py", line 1327, in
> _execute_childraise child_exceptionOSError: [Errno 2] No such file or
> directory[621/1394] ACTION
> //:js2c(//build/toolchain/linux:clang_arm64)ninja: build stopped:
> subcommand failed.*
> The exact GN command line is:  gn gen out/arm --args='is_debug=false
> symbol_level=0 enable_nacl=false is_official_build=true
> v8_use_snapshot=false v8_enable_i18n_support=false target_cpu="arm64"'
>
> I really don't have time to get down and dirty, especially since this
> appears to be a build configuration problem.  Does anybody have a simple
> solution?
>
> Ultimately, I would like to build natively on the ARM64 box, but I
> understand from the docs that this is not yet supported?  Does anybody have
> any experience with this?
>
> Thanx for any help.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Build v8 with visual studio 2015

2016-09-05 Thread Jochen Eisinger
the msvs-ninja gyp generator only creates an VS project that is suitable
for browsing and editting the sources, but not for compiling. If you want
to compile with MSVS, set the GYP_GENERATOR to msvs only.

On Fri, Sep 2, 2016 at 5:31 PM Илья Королевский  wrote:

> Hello. Im so confused. I've spent two week trying to build lib files for
> my project. What I did:
>
>1. unzipped depot_tools
>2. added depot_tools to Path var
>3. cd depot_tools
>4. set GYP_MSVS_VERSION=2015
>5. set DEPOT_TOOLS_WIN_TOOLCHAIN=0
>6. fetch v8
>7. gclient sync
>8. cd v8
>9. gclient sync
>10. set GYP_GENERATORS=msvs-ninja
>
>
>
> Then I open src/v8.sln, build v8 project (Debug.x86)
> Then I get files in out/Debug
>
>1. v8_base_0.lib
>2. v8_base_1.lib
>3. v8_base_2.lib
>4. v8_base_3.lib
>5. v8_external_snapshot.lib
>6. v8_libbase.lib
>7. v8_libplatform.lib
>8. v8_libsampler.lib
>9. v8_nosnapshot.lib
>
>
> I get this errors
>
>
> 
>
> Release.x86 error
>
> 
>
> Release.x64 errors
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Building v8 with a networking stack

2016-09-02 Thread Jochen Eisinger
chromium's implementation is here:
https://cs.chromium.org/chromium/src/net/proxy/proxy_resolver_v8.cc?rcl=1472733616=703

On Fri, Sep 2, 2016 at 3:53 AM Nick Chambers  wrote:

> Hello everyone! I have successfully built v8, however I have run into a
> snag. Essentially what I am after is the smallest amount of v8/chromium
> source that parses/resolves pac files. I know where to find the
> implementation of the basic functions like shExpMatch, but have been unable
> to find functions like dnsResolve and build it as a part of v8. Does anyone
> have steps/a good starting point for this? Thank you and have a great day!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Need to SetInternalFieldCount for both PrototypeTemplate and FunctionTemplate?

2016-09-02 Thread Jochen Eisinger
I don't know how nan expects bindings to work, so I can't really help you
there. Maybe somebody with more nan knowledge can chime in, or maybe
consider reaching out to the nan authors?

On Fri, Sep 2, 2016 at 5:42 AM Zach Bjornson  wrote:

> Hello,
>
> I'm trying to fix some code that creates a wrapped C++ object ("Canvas",
> emulating HTMLCanvasElement) with property accessors on the prototype.
> Specifically, these assertions should work to reflect browsers'
> HTMLCanvasElement API:
>
> var c = new Canvas(...);
> assert(!c.hasOwnProperty("width"));
> assert("width" in c);
> assert(HTMLCanvasElement.prototype.hasOwnProperty("width"));
>
> Currently there's an assertion failure (from nan) because the
> InternalFieldCount for the PrototypeTemplate is 0. Setting it to 1 fixes
> this problem, but without touching the rest of the code, both the
> FunctionTemplate and the PrototypeTemplate now have an InternalFieldCount
> of 1. Is that the correct situation? I can't find any examples of setting
> accessors on prototypes to work from.
>
> The class in question is this:
> https://github.com/Automattic/node-canvas/blob/master/src/Canvas.cc#L30
> (sorry it uses nan's macros and not raw v8 APIs)
> and the patch setting the PrototypeTemplate's InternalFieldCount is
> https://github.com/Automattic/node-canvas/issues/803#issuecomment-244275154
>
> Thanks,
> Zach
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Why I can't find "base/trace_event/common/trace_event_common.h"

2016-08-30 Thread Jochen Eisinger
did you run "gclient sync"? It should create that file

On Mon, Aug 29, 2016 at 8:22 AM  wrote:

> when i open the v8.sln  and compile it
> there have some errors
>
> libplatform\tracing\trace-writer.cc(9): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> 1>libplatform\tracing\trace-object.cc(7): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> 2>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> 5>-- 已启动生成:  项目: v8_base_2, 配置: Debug Win32 --
> 5>  api-arguments.cc
> 5>  arguments.cc
> 5>  asm-typer.cc
> 5>  asm-wasm-builder.cc
> 3>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (api-natives.cc)
> 3>  ast-numbering.cc
> 4>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (accessors.cc)
> 4>  builtins-call.cc
> 4>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (builtins\builtins-api.cc)
> 4>  builtins-date.cc
> 3>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (ast\ast-expression-rewriter.cc)
> 3>  ast-value-factory.cc
> 4>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (ast\variables.cc)
> 4>  builtins-generator.cc
> 3>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (assembler.cc)
> 3>  context-slot-cache.cc
> 3>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (asmjs\asm-js.cc)
> 3>  prettyprinter.cc
> 4>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (api-experimental.cc)
> 4>  builtins-interpreter.cc
> 5>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (api-arguments.cc)
> 5>  ast-literal-reindexer.cc
> 5>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (arguments.cc)
> 5>  ast.cc
> 3>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (ast\ast-numbering.cc)
> 5>F:\v8\v8\src/tracing/trace-event.h(10): fatal error C1083: 无法打开包括文件:
> “base/trace_event/common/trace_event_common.h”: No such file or directory
> (asmjs\asm-wasm-builder.cc)
> 3>  builtins-boolean.cc
>
> how can i solve this problem
> thanks
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Can V8 crash due to memory allocation failure? Can this crash the entire process?

2016-08-05 Thread Jochen Eisinger
V8 doesn't (consistently) handle oom situations but expects the allocator
to crash the process if it can't fulfill a request.

Paul Baker  schrieb am Mi., 3. Aug. 2016, 11:55:

> It appears that V8 allocates JavaScript objects on a manually-managed
> heap, memory for which is ultimately obtained from mmap/VirtualAlloc
> (on Linux/Windows). However, for its internal data structures, V8
> seems to use C++ standard containers such as `std::vector` [1]. If
> these containers need to allocate memory, but are unable to, they
> usually throw `std::bad_alloc`.
>
> However, V8 is compiled with -fno-exceptions [2]. If exceptions cannot
> be used, how does V8 handle the situation where the internal data
> structures are unable to allocate memory? Does it crash? If so, does
> this take down any process which embeds V8?
>
> [1]: https://github.com/v8/v8/search?utf8=%E2%9C%93=std%20vector
> [2]: https://groups.google.com/d/msg/v8-users/ffdydgcdavM/rKiTQlzvAgAJ
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Link failure with libv8

2016-08-01 Thread Jochen Eisinger
Maybe your target system doesn't have the gold linker?

ld -v should say something like: GNU gold (GNU Binutils 2.26.20160125) 1.11

You can also try to compile v8 without gold by setting
linux_use_bundled_gold=0 and linux_use_gold_flags=0 in your GYP_DEFINES

On Sat, Jul 30, 2016 at 6:13 PM Mark Tarrabain  wrote:

> Is there anything special I need to be doing if I want to compile v8 as a
> static library on one system and then build an application that links to it
> on another (same OS and cpu, but possibly a different compiler or compiler
> version)?   I was trying this yesterday, and when I went to build my
> application that links to v8 (on a different system than the one that built
> the library), I  received the following error:
>
> lib/libv8_base.a: error adding symbols: Malformed archive
> collect2: error: ld returned 1 exit status
>
> Thanks
> Mark
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Exposing nested maps from C++ into JS world

2016-07-29 Thread Jochen Eisinger
I commented on the example

On Thu, Jul 28, 2016 at 2:14 PM Abhishek Singh <singhabhishek@gmail.com>
wrote:

> Please find standalone code simulating your suggestion -
> https://gist.github.com/abhi-bit/d3a2910ec54a47ce8294c2cc0c4bef93 (In the
> comment pasted output in my case). Will appreciate if you could guide using
> this test script.
>
>
> On 28-Jul-2016, at 4:05 PM, Abhishek Singh <singhabhishek@gmail.com>
> wrote:
>
> I believe this is the change you wanted me to do:
>
> Local HTTPBody::WrapHTTPBodyMap() {
>   EscapableHandleScope handle_scope(GetIsolate());
>
>   Local body_map_template =
> FunctionTemplate::New(GetIsolate());
>   body_map_template->InstanceTemplate()->SetHandler(
>   NamedPropertyHandlerConfiguration(NULL, HTTPBodySet));
>   body_map_template->InstanceTemplate()->SetInternalFieldCount(1);
>   Local result = body_map_template->GetFunction()->NewInstance();
>
>   Local map_ptr = External::New(GetIsolate(), _body);
>
>   result->SetInternalField(0, map_ptr);
>
>   return handle_scope.Escape(result);
> }
>
> This didn’t help. I’ll share a standalone program that simulates problem I
> see, maybe that would help you to see what the problem could be? Would be
> some bit of effort for me, but will do given it will be very useful to have
> nested c++ maps exposed to JS.
>
> On 28-Jul-2016, at 12:54 PM, Jochen Eisinger <joc...@chromium.org> wrote:
>
> I guess you should use function templates here.
>
> Local body_map_template = FunctionTemplate::New(isolate);
> body_map_template->InstanceTemplate()->SetHandler(...)
> body_map_template->InstanceTemplate()->SetInternalFieldCount(1);
> result = body_map_template->GetFunction()->NewInstance();
>
> On Wed, Jul 27, 2016 at 4:27 PM Abhishek Singh <
> singhabhishek@gmail.com> wrote:
>
>> Hi Jochen,
>>
>> Full code of relevant file available - http://pastebin.com/fZJENvSi
>>
>> Snippet of relevant portions for WrapHTTPBodyMap:
>>
>> Local HTTPBody::MakeHTTPBodyMapTemplate(
>> Isolate* isolate) {
>>   EscapableHandleScope handle_scope(isolate);
>>
>>   Local result = ObjectTemplate::New(isolate);
>>   result->SetInternalFieldCount(1);
>>   result->SetHandler(NamedPropertyHandlerConfiguration(NULL,
>>HTTPBodySet));
>>
>>   return handle_scope.Escape(result);
>> }
>>
>> Local HTTPBody::WrapHTTPBodyMap() {
>>   EscapableHandleScope handle_scope(GetIsolate());
>>
>>   if (http_body_map_template_.IsEmpty()) {
>> Local raw_template =
>> MakeHTTPBodyMapTemplate(GetIsolate());
>> http_body_map_template_.Reset(GetIsolate(), raw_template);
>>   }
>>   Local templ =
>>   Local::New(GetIsolate(), http_body_map_template_);
>>
>>   Local result =
>>
>> templ->NewInstance(GetIsolate()->GetCurrentContext()).ToLocalChecked();
>>
>>   Local map_ptr = External::New(GetIsolate(), _body);
>>
>>   result->SetInternalField(0, map_ptr);
>>
>>   return handle_scope.Escape(result);
>> }
>>
>>
>> On 27-Jul-2016, at 7:47 PM, Jochen Eisinger <joc...@chromium.org> wrote:
>>
>> Can you provide a complete example? I suspect that WrapHTTPBodyMap
>> doesn't do what you expect it does
>>
>> On Tue, Jul 26, 2016 at 1:04 PM Abhishek Singh <
>> singhabhishek@gmail.com> wrote:
>>
>>> Would you mind guiding me a bit here? For now just trying to expose
>>> nested “body” map i.e. to allow something like “response.body.result =
>>> dbQueryResult"
>>>
>>> First is the Set interceptor for “response” (C++ object) and here I’m
>>> setting up “body” (C++ object for “body”) & setting return value to “body”
>>> object. Second one is Set interceptor for “body”
>>>
>>> void HTTPResponse::HTTPResponseSet(Local name, Local
>>> value_obj,
>>>const PropertyCallbackInfo&
>>> info) {
>>>   if (name->IsSymbol()) return;
>>>
>>>   V8Handle* w = UnwrapV8HandleInstance(info.Holder());
>>>   HTTPBody* body = new HTTPBody(w);
>>>
>>>   Local body_map = body->WrapHTTPBodyMap();
>>>   info.GetReturnValue().Set(body_map);
>>> }
>>>
>>>
>>> void HTTPBody::HTTPBodySet(Local name, Local value_obj,
>>>const PropertyCallbackInfo& info) {
>>>   if (name->IsSymbol()) return;
>>>
>>> 

Re: [v8-users] v8 gyp build fail

2016-07-28 Thread Jochen Eisinger
I wonder whether you have curl installed?

On Thu, Jul 28, 2016 at 6:53 PM chaony  wrote:

> Hi,
> I want to try v8 engine in my project, but it seems something wrong. I
> do it in following way:
>
> 1. git clone: git clone
> https://chromium.googlesource.com/chromium/tools/depot_tools.git
> 2. export path: export PATH=`pwd`/depot_tools:"$PATH”
> 3. fetch v8 with error:
>
> fetch v8
> Running: gclient root
> Running: gclient config --spec 'solutions = [
>   {
> "managed": False,
> "name": "v8",
> "url": "https://chromium.googlesource.com/v8/v8.git;,
> "custom_deps": {},
> "deps_file": "DEPS",
> "safesync_url": "",
>   },
> ]
> '
> Running: gclient sync --with_branch_heads
> Error: Command '/usr/bin/python
> v8/build/linux/sysroot_scripts/install-sysroot.py --running-as-hook'
> returned non-zero exit status 1 in /root
> Traceback (most recent call last):
>   File "/root/depot_tools/fetch.py", line 353, in 
> sys.exit(main())
>   File "/root/depot_tools/fetch.py", line 348, in main
> return run(options, spec, root)
>   File "/root/depot_tools/fetch.py", line 342, in run
> return checkout.init()
>   File "/root/depot_tools/fetch.py", line 142, in init
> self.run_gclient(*sync_cmd)
>   File "/root/depot_tools/fetch.py", line 76, in run_gclient
> return self.run(cmd_prefix + cmd, **kwargs)
>   File "/root/depot_tools/fetch.py", line 66, in run
> return subprocess.check_output(cmd, **kwargs)
>   File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
> raise CalledProcessError(retcode, cmd, output=output)
> subprocess.CalledProcessError: Command '('gclient', 'sync',
> '--with_branch_heads')' returned non-zero exit status 2
>
> 4. Then I try gclient sync
>
> Running depot tools as root is sad.
> .gclient file in parent directory /root might not be the file you want to
> use
> Syncing projects: 100% (22/22), done.
>
>  running '/usr/bin/python v8/gypfiles/landmines.py' in '/root'
>
>  running 'download_from_google_storage --no_resume
> --platform=win32 --no_auth --bucket chromium-clang-format -s
> v8/buildtools/win/clang-format.exe.sha1' in '/root'
> The current platform doesn't match "win32", skipping.
>
>  running 'download_from_google_storage --no_resume
> --platform=darwin --no_auth --bucket chromium-clang-format -s
> v8/buildtools/mac/clang-format.sha1' in '/root'
> The current platform doesn't match "darwin", skipping.
>
>  running 'download_from_google_storage --no_resume
> --platform=linux* --no_auth --bucket chromium-clang-format -s
> v8/buildtools/linux64/clang-format.sha1' in '/root'
> 0> File v8/buildtools/linux64/clang-format exists and SHA1 matches.
> Skipping.
> Success!
> Downloading 1 files took 0.004160 second(s)
>
>  running '/usr/bin/python
> v8/tools/gcmole/download_gcmole_tools.py' in '/root'
> Skipping gcmole download as gcmole is not set in gyp flags.
>
>  running '/usr/bin/python
> v8/tools/jsfunfuzz/download_jsfunfuzz.py' in '/root'
> Skipping jsfunfuzz download as jsfunfuzz is not set in gyp flags.
>
>  running 'download_from_google_storage --no_resume
> --platform=win32 --no_auth --bucket chromium-luci -d
> v8/tools/luci-go/win64' in '/root'
> The current platform doesn't match "win32", skipping.
>
>  running 'download_from_google_storage --no_resume
> --platform=darwin --no_auth --bucket chromium-luci -d
> v8/tools/luci-go/mac64' in '/root'
> The current platform doesn't match "darwin", skipping.
>
>  running 'download_from_google_storage --no_resume
> --platform=linux* --no_auth --bucket chromium-luci -d
> v8/tools/luci-go/linux64' in '/root'
>
> ▽
> 0> File v8/tools/luci-go/linux64/isolate exists and SHA1 matches. Skipping.
> Success!
> Downloading 1 files took 0.023040 second(s)
>
>  running 'download_from_google_storage --no_resume
> --platform=win32 --no_auth --bucket chromium-gn -s
> v8/buildtools/win/gn.exe.sha1' in '/root'
> The current platform doesn't match "win32", skipping.
>
>  running 'download_from_google_storage --no_resume
> --platform=darwin --no_auth --bucket chromium-gn -s
> v8/buildtools/mac/gn.sha1' in '/root'
> The current platform doesn't match "darwin", skipping.
>
>  running 'download_from_google_storage --no_resume
> --platform=linux* --no_auth --bucket chromium-gn -s
> v8/buildtools/linux64/gn.sha1' in '/root'
> 0> File v8/buildtools/linux64/gn exists and SHA1 matches. Skipping.
> Success!
> Downloading 1 files took 0.004107 second(s)
>
>  running '/usr/bin/python
> v8/build/linux/sysroot_scripts/install-sysroot.py --running-as-hook' in
> '/root'
> Installing Debian Wheezy amd64 root image:
> /root/v8/build/linux/debian_wheezy_amd64-sysroot
> Downloading
> https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/c52471d9dec240c8d0a88fa98aa1eefeee32e22f/debian_wheezy_amd64_sysroot.tgz
> Traceback (most recent call last):
>   File 

Re: [v8-users] Re[3]: gyp_v8 error when building

2016-07-28 Thread Jochen Eisinger
Steve,

I have to ask you to immediately stop this escalatory behavior.

Failure to do so will result in a ban from this mailing list, and other
chromium communication channels.

best
-jochen

On Thu, Jul 28, 2016 at 2:50 PM Steve Paesani 
wrote:

> I think you jumping in here with yout insults and further hostility proves
> my point.
>
> --
> Sent from myMail app for Android
> Thursday, 28 July 2016, 06:46AM -04:00 from Ben Noordhuis
> i...@bnoordhuis.nl:
>
> On Thu, Jul 28, 2016 at 12:00 PM,  > wrote:
> > On a final note I just did a search and read what a "googler" is.
> >
> > Would have been nice to know v8 compilation isn't intended for non google
> > employees.
> >
> > Rather hostile not to indicate it more clearly
> >
> > More hostile still not to have mentioned it here while I was struggling
> to
> > build it.
> >
> > The more I lean about google, the less I like.
> >
> > Hioenstly be glad when the company and it's employees get what they gave.
> >
> > Very little.
> >
> > If not worse
>
> Not a Googler, happily building V8 on Windows and other platforms.
> You simply did something wrong and instead of thanking the people
> trying to help you, you're going completely off the rail.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 
> 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/0QlUWtsyzcQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Exposing nested maps from C++ into JS world

2016-07-28 Thread Jochen Eisinger
I guess you should use function templates here.

Local body_map_template = FunctionTemplate::New(isolate);
body_map_template->InstanceTemplate()->SetHandler(...)
body_map_template->InstanceTemplate()->SetInternalFieldCount(1);
result = body_map_template->GetFunction()->NewInstance();

On Wed, Jul 27, 2016 at 4:27 PM Abhishek Singh <singhabhishek@gmail.com>
wrote:

> Hi Jochen,
>
> Full code of relevant file available - http://pastebin.com/fZJENvSi
>
> Snippet of relevant portions for WrapHTTPBodyMap:
>
> Local HTTPBody::MakeHTTPBodyMapTemplate(
> Isolate* isolate) {
>   EscapableHandleScope handle_scope(isolate);
>
>   Local result = ObjectTemplate::New(isolate);
>   result->SetInternalFieldCount(1);
>   result->SetHandler(NamedPropertyHandlerConfiguration(NULL,
>HTTPBodySet));
>
>   return handle_scope.Escape(result);
> }
>
> Local HTTPBody::WrapHTTPBodyMap() {
>   EscapableHandleScope handle_scope(GetIsolate());
>
>   if (http_body_map_template_.IsEmpty()) {
> Local raw_template =
> MakeHTTPBodyMapTemplate(GetIsolate());
> http_body_map_template_.Reset(GetIsolate(), raw_template);
>   }
>   Local templ =
>   Local::New(GetIsolate(), http_body_map_template_);
>
>   Local result =
>
> templ->NewInstance(GetIsolate()->GetCurrentContext()).ToLocalChecked();
>
>   Local map_ptr = External::New(GetIsolate(), _body);
>
>   result->SetInternalField(0, map_ptr);
>
>   return handle_scope.Escape(result);
> }
>
>
> On 27-Jul-2016, at 7:47 PM, Jochen Eisinger <joc...@chromium.org> wrote:
>
> Can you provide a complete example? I suspect that WrapHTTPBodyMap doesn't
> do what you expect it does
>
> On Tue, Jul 26, 2016 at 1:04 PM Abhishek Singh <
> singhabhishek@gmail.com> wrote:
>
>> Would you mind guiding me a bit here? For now just trying to expose
>> nested “body” map i.e. to allow something like “response.body.result =
>> dbQueryResult"
>>
>> First is the Set interceptor for “response” (C++ object) and here I’m
>> setting up “body” (C++ object for “body”) & setting return value to “body”
>> object. Second one is Set interceptor for “body”
>>
>> void HTTPResponse::HTTPResponseSet(Local name, Local
>> value_obj,
>>const PropertyCallbackInfo&
>> info) {
>>   if (name->IsSymbol()) return;
>>
>>   V8Handle* w = UnwrapV8HandleInstance(info.Holder());
>>   HTTPBody* body = new HTTPBody(w);
>>
>>   Local body_map = body->WrapHTTPBodyMap();
>>   info.GetReturnValue().Set(body_map);
>> }
>>
>>
>> void HTTPBody::HTTPBodySet(Local name, Local value_obj,
>>const PropertyCallbackInfo& info) {
>>   if (name->IsSymbol()) return;
>>
>>   string key = ObjectToString(Local::Cast(name));
>>   string value = ToString(info.GetIsolate(), value_obj);
>>
>>   map<string, string>* body = UnwrapMap(info.Holder());
>>   (*body)[key] = value;
>>
>>   cout << "body field " << value << endl;
>> }
>>
>>
>> Currently I’m not hitting Set interceptor of “body” object, I suppose I’m
>> doing something wrong here.
>>
>> On 25-Jul-2016, at 10:00 PM, Jochen Eisinger <joc...@chromium.org> wrote:
>>
>> To create dynamic nested maps from C++, the outter object (response)
>> would have to return another intercepted object (e.g. body) that then
>> returns the actual values on access.
>>
>> On Fri, Jul 22, 2016 at 8:12 AM Abhishek Singh <
>> singhabhishek@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I’m wondering if there is a way to expose map<string, map<string,
>>> string> > into JS world from C++? Exposing map<string, string> looks
>>> straightforward and I’m doing for some C++ objects using
>>> NamedPropertyConfigurationHandler. I’ll just show sample JS code that I
>>> would like to have and where C++ map<string, map<string, string> > will
>>> come into picture:
>>>
>>> function OnHTTPGet(request, response) {
>>>
>>> var city = “BLR”;
>>> var limit = “10”;
>>>
>>> var queryResult = dbCal(“select * from users where city=${city}
>>> limit ${limit}”);
>>>
>>> // This works for me presently
>>> /* response.data = queryResult;
>>> response.status_code = 200; */
>>>
>>> // What I would li

Re: [v8-users] Exposing nested maps from C++ into JS world

2016-07-27 Thread Jochen Eisinger
Can you provide a complete example? I suspect that WrapHTTPBodyMap doesn't
do what you expect it does

On Tue, Jul 26, 2016 at 1:04 PM Abhishek Singh <singhabhishek@gmail.com>
wrote:

> Would you mind guiding me a bit here? For now just trying to expose nested
> “body” map i.e. to allow something like “response.body.result =
> dbQueryResult"
>
> First is the Set interceptor for “response” (C++ object) and here I’m
> setting up “body” (C++ object for “body”) & setting return value to “body”
> object. Second one is Set interceptor for “body”
>
> void HTTPResponse::HTTPResponseSet(Local name, Local
> value_obj,
>const PropertyCallbackInfo&
> info) {
>   if (name->IsSymbol()) return;
>
>   V8Handle* w = UnwrapV8HandleInstance(info.Holder());
>   HTTPBody* body = new HTTPBody(w);
>
>   Local body_map = body->WrapHTTPBodyMap();
>   info.GetReturnValue().Set(body_map);
> }
>
>
> void HTTPBody::HTTPBodySet(Local name, Local value_obj,
>const PropertyCallbackInfo& info) {
>   if (name->IsSymbol()) return;
>
>   string key = ObjectToString(Local::Cast(name));
>   string value = ToString(info.GetIsolate(), value_obj);
>
>   map<string, string>* body = UnwrapMap(info.Holder());
>   (*body)[key] = value;
>
>   cout << "body field " << value << endl;
> }
>
>
> Currently I’m not hitting Set interceptor of “body” object, I suppose I’m
> doing something wrong here.
>
> On 25-Jul-2016, at 10:00 PM, Jochen Eisinger <joc...@chromium.org> wrote:
>
> To create dynamic nested maps from C++, the outter object (response) would
> have to return another intercepted object (e.g. body) that then returns the
> actual values on access.
>
> On Fri, Jul 22, 2016 at 8:12 AM Abhishek Singh <
> singhabhishek@gmail.com> wrote:
>
>> Hi,
>>
>> I’m wondering if there is a way to expose map<string, map<string, string>
>> > into JS world from C++? Exposing map<string, string> looks
>> straightforward and I’m doing for some C++ objects using
>> NamedPropertyConfigurationHandler. I’ll just show sample JS code that I
>> would like to have and where C++ map<string, map<string, string> > will
>> come into picture:
>>
>> function OnHTTPGet(request, response) {
>>
>> var city = “BLR”;
>> var limit = “10”;
>>
>> var queryResult = dbCal(“select * from users where city=${city}
>> limit ${limit}”);
>>
>> // This works for me presently
>> /* response.data = queryResult;
>> response.status_code = 200; */
>>
>> // What I would like to have
>> response.body.data = queryResult;
>> response.header.status_code = 200;
>> }
>>
>> “request” - native HTTP request JSON passed from C++ V8 binding as args
>> to JS function
>> “response” - C++ based HTTP object exposed with Setter callback set using
>> NamedPropertyConfigHandler and this what I write back to user who made the
>> “request"
>>
>> I basically want to set HTTP response body and header transparently,
>> which would require me to expose C++ HTTP object probably as a map<string,
>> map<string, string> >. Hope my question is clear, please let me know if
>> there a way to do this?
>>
>> Thanks,
>> Abhishek
>>
>> --
>> --
>> v8-users mailing list
>> v8-users@googlegroups.com
>> 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 v8-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: gyp_v8 error when building

2016-07-27 Thread Jochen Eisinger
btw, I want to point out that we have a code of conduct
https://chromium.googlesource.com/chromium/src/+/master/CODE_OF_CONDUCT.md

Offensive comments, jokes or otherwise, are explicitly called out as
something we don't tolerate.

Please take that into account for future communication.

thanks
-jochen

On Wed, Jul 27, 2016 at 12:12 PM  wrote:

> Thanks for your help Michael. I thought the "if you're not a googler" and
> the env var was a joke to cut the build short. But I se it also at
> https://chromium.googlesource.com/chromium/src/+show/master/docs/windows_build_instructions.md
>
> Thanks again for your help.
>
> I might give v8 a shot on a linux box someday but maybe it's all for the
> best.
>
> Cheers
>
>
>
> On Sunday, July 24, 2016 at 7:47:52 AM UTC-4, spaesani...@gmail.com wrote:
>
>> Calling python gypfiles\gyp_v8 gives a CalledProcessError
>>
>> subprocess.check_call(get_toolchain_args) produces the error at  line 540
>> of check_call
>>
>> The call string in the error is a long string of double back slashed
>> paths, which I would assume are acceptable on windows, as well as what
>> looks like a chksum or signature.
>>
>> I don't have a copy function in te console window to show the whole error
>> but I'm wondering if it sounds familiar to anyone. Maybe the string is
>> misconcatenated somewhere earlier and can be addressed.
>>
>>
>>
>>
>>
>>
>> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Exposing nested maps from C++ into JS world

2016-07-25 Thread Jochen Eisinger
To create dynamic nested maps from C++, the outter object (response) would
have to return another intercepted object (e.g. body) that then returns the
actual values on access.

On Fri, Jul 22, 2016 at 8:12 AM Abhishek Singh 
wrote:

> Hi,
>
> I’m wondering if there is a way to expose map
> > into JS world from C++? Exposing map looks
> straightforward and I’m doing for some C++ objects using
> NamedPropertyConfigurationHandler. I’ll just show sample JS code that I
> would like to have and where C++ map > will
> come into picture:
>
> function OnHTTPGet(request, response) {
>
> var city = “BLR”;
> var limit = “10”;
>
> var queryResult = dbCal(“select * from users where city=${city}
> limit ${limit}”);
>
> // This works for me presently
> /* response.data = queryResult;
> response.status_code = 200; */
>
> // What I would like to have
> response.body.data = queryResult;
> response.header.status_code = 200;
> }
>
> “request” - native HTTP request JSON passed from C++ V8 binding as args to
> JS function
> “response” - C++ based HTTP object exposed with Setter callback set using
> NamedPropertyConfigHandler and this what I write back to user who made the
> “request"
>
> I basically want to set HTTP response body and header transparently, which
> would require me to expose C++ HTTP object probably as a map map >. Hope my question is clear, please let me know if
> there a way to do this?
>
> Thanks,
> Abhishek
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] gyp_v8 error when building

2016-07-25 Thread Jochen Eisinger
can you paste the full error?

On Sun, Jul 24, 2016 at 1:47 PM  wrote:

> Calling python gypfiles\gyp_v8 gives a CalledProcessError
>
> subprocess.check_call(get_toolchain_args) produces the error at  line 540
> of check_call
>
> The call string in the error is a long string of double back slashed
> paths, which I would assume are acceptable on windows, as well as what
> looks like a chksum or signature.
>
> I don't have a copy function in te console window to show the whole error
> but I'm wondering if it sounds familiar to anyone. Maybe the string is
> misconcatenated somewhere earlier and can be addressed.
>
>
>
>
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Accessing global object in javascript function call

2016-07-22 Thread Jochen Eisinger
Function::Call only allows you to set the receiver, not rebind the function
to a different context.

You should be able to access number1 using this.number1.

You could pass the script in as a string and compile it for the target
context for example.

On Thu, Jul 21, 2016 at 11:58 PM Bryan Grim  wrote:

> I have a need to execute functions in completely isolated contexts.  I'm
> not having much luck, though.  My context's global object does not seem
> accessible to a call to my javascript function.
>
> Using the shell.cc example, I added these callbacks:
>
> void SetupContext(const v8::FunctionCallbackInfo& args);
> void CallInContext(const v8::FunctionCallbackInfo& args);
> void PrintGlobalContext(const v8::FunctionCallbackInfo& args);
>
>
> Implemented like so:
>
> void SetupContext(const v8::FunctionCallbackInfo& args)
> {
> //Get the default isolate
> v8::Isolate* pIsolate = args.GetIsolate();
> //create a stack allocated handle scope
> v8::HandleScope handle_scope(pIsolate);
> //Create the global template
>
> if (args.Length() < 2)
> {
> args.GetIsolate()->ThrowException(
> v8::String::NewFromUtf8(args.GetIsolate(), "Not enough
> parameters for call.  Correct format: ([ontext name], [script to run])",
> v8::NewStringType::kNormal).ToLocalChecked());
> return;
> }
> v8::String::Utf8Value argContextName(args[0]);
> v8::String::Utf8Value argContextGlobals(args[1]);
> std::string strScriptName = ToCString(argContextName);
> if (!sContextMap[strScriptName].IsEmpty())
> {
> // assume it's not an error for, as we should be able to continue
> on no problem.
> return;
> }
>
> v8::Local global_template = v8::ObjectTemplate::
> New();
> //Create the context
> v8::Local context = v8::Context::New(pIsolate, NULL,
> global_template);
> v8::Context::Scope context_scope(context);
>
> v8::Local scriptName = v8::String::NewFromUtf8(pIsolate, *
> argContextName, v8::NewStringType::kNormal).ToLocalChecked();
> v8::Local source = v8::String::NewFromUtf8(pIsolate, *
> argContextGlobals, v8::NewStringType::kNormal).ToLocalChecked();
>
> bool success = ExecuteString(pIsolate, source, scriptName, false, true
> );
>
> if (success)
> {
> if (sContextMap[strScriptName].IsEmpty())
> {
> v8::Local security = v8::String::NewFromUtf8(
> pIsolate, "Security!", v8::NewStringType::kNormal).ToLocalChecked();
> context->SetSecurityToken(security);
> sContextMap[strScriptName].Reset(pIsolate, context);
> }
> args.GetReturnValue().Set(
> v8::String::NewFromUtf8(args.GetIsolate(), "Awesome!!"
> ,
> v8::NewStringType::kNormal).ToLocalChecked());
> }
> else
> {
> args.GetReturnValue().Set(
> v8::String::NewFromUtf8(args.GetIsolate(), "Totally Not
> Awesome...",
> v8::NewStringType::kNormal).ToLocalChecked());
>
> }
> }
>
> As you can see, I keep the newly created contexts in a map:  static
> std::map sContextMap;  They are
> created when this script runs:
> setupContext("one","var number1 = 4;");
>
> I want to be able to call a function within this new context, by running
> this:
> var num3 = 0;
> var num4 = 0;
> callInContext("one", function (outerNum1, outerNum2) { var num2 = 3;
> outerNum1 = number1; outerNum2 = outerNum1 + num2; }, num3, num4);
>
> The CallinContext function looks like this:
>
> void CallInContext(const v8::FunctionCallbackInfo& args)
> {
> //Get the default isolate
> v8::Isolate* pIsolate = args.GetIsolate();
> //create a stack allocated handle scope
> v8::HandleScope handle_scope(pIsolate);
>
> if (args.Length() < 4)
> {
> args.GetIsolate()->ThrowException(
> v8::String::NewFromUtf8(args.GetIsolate(), "Not enough
> parameters for call.",
> v8::NewStringType::kNormal).ToLocalChecked());
> return;
> }
>
> int argIndex = 0;
> std::string ruleContext = ToCString(v8::String::Utf8Value(args[
> argIndex]));
> v8::String::Utf8Value argContext(args[argIndex]);
> auto context = sContextMap[ruleContext].Get(pIsolate);
>
> if (!context.IsEmpty())
> {
> v8::Context::Scope cs(context);
>
> auto scriptFun = v8::Local::Cast(args[1]);
> const int argc = 2;
> v8::Local argv[argc];
> argv[0] = args[2];
> argv[1] = args[3];
>
> auto result = scriptFun->Call(context->Global(), argc, argv);
>
>
> }
> }
>
> When I run it all, though, I get a complaint that "number1 is not defined."
>
> If I run this script, though
> printGlobalContext("one");
>
> and trigger this function:
> void PrintGlobalContext(const v8::FunctionCallbackInfo& args) {
> bool first = true;
> for (int i = 0; i < args.Length(); i++)
> {
> 

Re: [v8-users] Building V8 Libraries Help. (Repositories Offline?)

2016-07-20 Thread Jochen Eisinger
Please reach out to IBM team. The svn server referenced in that
documentation doesn't exist anymore, however, the s390(x) port is meanwhile
(completely?) upstream, so just following the regular v8 build instructions
might work?

On Wed, Jul 20, 2016 at 12:33 AM Allen Ng  wrote:

> Hello all,
>
> I do not know if this is the right place for this but it can't hurt to
> try! I am currently trying to build V8 Libraries following this tutorial, 
> Building
> V8 Libraries Tutorial
> . I am
> trying to build these on a s390x Ubuntu Docker Container on a SLES 12
>  instance on the LinuxONE Community Cloud. I have been following along with
> it but when it comes time to do "make dependencies" I get an error that
> sasy teh SVN can not connect to the gyp.googlecode.com/svn/trunks
> repository. I looked around on Google and it seems that repository has been
> taken offline. There are two other repositories down the line, googletest
> and googlemock repositories, that also seem to have been taken down and
> merged into one single repository.
>
> So I was wondering if any of you know of a different tutorial that would
> help me here. I have found github mirrors of gyp.googlecode.com/svn/trunk
> and it seems to work but when I run the next command of  "make s390x -j4
> library=shared" i get an error after replacing the googletest and
> googlemock repositories with the new combined repository managed by Google.
> The error is a "No rule to make target for gtest_main.o.
>
> The main thing I am looking for is if there are any up to date tutorials
> on building the V8 Libraries on a LinuxONE Community Cloud Instance. If you
> need anymore information please feel free to ask.
>
>
> Thanks,
> Allen
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How to inherit objects like a c++'s objects??

2016-07-11 Thread Jochen Eisinger
Right

On Fri, Jul 8, 2016 at 11:01 AM Le_t0s <psychole...@gmail.com> wrote:

> Yes, it should solve my problem. But object template hasn't any way to
> inherit for now, am I right?
>
> пятница, 8 июля 2016 г., 11:38:27 UTC+4 пользователь Jochen Eisinger
> написал:
>>
>> Does using FunctionTemplate::Inherit solve your problem?
>>
>> On Thu, Jul 7, 2016 at 9:08 AM Le_t0s <psych...@gmail.com> wrote:
>>
> Hello. I have following situation. I have 2 classes (e.g. Parent and
>>> Child). Parent has method "DoSmth", and Child have method "DoSmthElse". I
>>> create two templates, like these:
>>> auto parentObj = ObjectTemplate::New(isolate);
>>> Local SmthCallBack = FunctionTemplate::New(isolate,
>>> FuncCallBack, External::New(isolate, DoSmth));
>>> parentObj->Set(String::NewFromUtf8(isolate, "DoSmth", NewStringType::
>>> kNormal).ToLocalChecked(), SmthCallBack);
>>>
>>> auto childObj = ObjectTemplate::New(isolate);
>>> Local SmthElseCallBack = FunctionTemplate::New(isolate
>>> , FuncCallBack, External::New(isolate, DoSmthElse));
>>> childObj->Set(String::NewFromUtf8(isolate, "DoSmthElse", NewStringType::
>>> kNormal).ToLocalChecked(), SmthElseCallBack);
>>>
>>> And my question is: Is there any way to inherit method "DoSmth" from
>>> Parent to Child (and other methods if they exists)?
>>> Thanks.
>>>
>>> --
>>> --
>>> v8-users mailing list
>>>
>> v8-u...@googlegroups.com
>>
>>
>>> 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 v8-users+u...@googlegroups.com.
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How to inherit objects like a c++'s objects??

2016-07-08 Thread Jochen Eisinger
Does using FunctionTemplate::Inherit solve your problem?

On Thu, Jul 7, 2016 at 9:08 AM Le_t0s  wrote:

> Hello. I have following situation. I have 2 classes (e.g. Parent and
> Child). Parent has method "DoSmth", and Child have method "DoSmthElse". I
> create two templates, like these:
> auto parentObj = ObjectTemplate::New(isolate);
> Local SmthCallBack = FunctionTemplate::New(isolate,
> FuncCallBack, External::New(isolate, DoSmth));
> parentObj->Set(String::NewFromUtf8(isolate, "DoSmth", NewStringType::
> kNormal).ToLocalChecked(), SmthCallBack);
>
> auto childObj = ObjectTemplate::New(isolate);
> Local SmthElseCallBack = FunctionTemplate::New(isolate,
> FuncCallBack, External::New(isolate, DoSmthElse));
> childObj->Set(String::NewFromUtf8(isolate, "DoSmthElse", NewStringType::
> kNormal).ToLocalChecked(), SmthElseCallBack);
>
> And my question is: Is there any way to inherit method "DoSmth" from
> Parent to Child (and other methods if they exists)?
> Thanks.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Build on Windows - cannot generate Visual Studio solution

2016-07-08 Thread Jochen Eisinger
do you have any gyp related environment variables set, e.g. GYP_GENERATORS?

On Thu, Jul 7, 2016 at 6:13 PM Riccardo Corsi 
wrote:

> Hi all,
>
> I've been following all the instructions to build V8 on Windows from here:
> https://github.com/v8/v8/wiki/Building%20with%20Gyp#visual-studio
>
> only replacing the instruction
>
>> python build\gyp_v8
>
>
> with
>
>> python gypfiles\gyp_v8
>
>
> as the former file does not exist in the repository anymore.
>
> After running this command I cannot find any generated solution for Visual
> Studio (All.sln).
> I don't get any error, but the sln file is not generated.
>
> Any hints?
> Thanks,
> Ricky
>
>
>
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Executing JS within an android app

2016-07-04 Thread Jochen Eisinger
Hey,

I don't know much about Android APIs and whether or not they include v8,
sorry.

You might have better luck asking on an Android related forum

Best
Jochen

Poorna  schrieb am Sa., 2. Juli 2016, 00:05:

> Hello folks,
>
> We are writing an android app in which we want to execute javascript from
> app. Since v8 is in-built into android, can we use v8  through JNI/NDK to
> execute javascript?
>
> While searching through Internet I found this SO question(
> http://stackoverflow.com/questions/6880778/android-utilize-v8-without-webview)
> in which developers used to access v8 functionality through webkit (which
> is present as a shared library libwebcore.so). Since webkit is replaced
> with blink in recent android versions, is there any way I an execute
> javascript through blink or directly v8?
>
> I know we can statically link v8 engine (embed) to the app, but the app
> size increases by lot of megs. v8 or any js engine is not available as a
> shared library. Is there any way we can access v8 functionality either
> directly or indirectly?
>
> Thanks,
> Poorna
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How to re-generate the .sln and the .vcxproj

2016-07-01 Thread Jochen Eisinger
GYP_GENERATOR=ninja will create files for the ninja build system. If you
want MSVS files, you'll have to unset that variable (or set it to msvs I
think)

On Fri, Jul 1, 2016 at 9:21 AM Amaranth F <fallings...@gmail.com> wrote:

> Yes, I followed the instruction from here
> <https://github.com/v8/v8/wiki/Building%20with%20Gyp>.
>
> set GYP_GENERATORS=ninja
> python build\gyp_v8
>
>
> 在 2016年7月1日星期五 UTC+8下午3:15:57,Jochen Eisinger写道:
>>
>> Do you happen to have any gyp related environment variable set, e.g.
>> GYP_GENERATORS?
>>
>> On Thu, Jun 30, 2016 at 2:25 PM Amaranth F <falli...@gmail.com> wrote:
>>
> I've built v8 successfully some days ago, and today I'm following this
>>> post to add extra files to my project.
>>> http://v8project.blogspot.com/2016/02/v8-extras.html
>>>
>>> I added
>>> 'v8_extra_library_files': [
>>> '../test/cctest/test-extra.js',
>>> '../extra/vec2.js'
>>> ],
>>> to the standalone.gypi, and run the cmd:
>>> python gypfiles\gyp_v8
>>> Updating projects from gyp files...
>>>
>>> But the js2c.vcxproj file isn't modified at all. Even I deleted all the
>>> .sln and .vcxproj files, the gyp couldn't generate any files more.
>>>
>>> --
>>> --
>>> v8-users mailing list
>>>
>> v8-u...@googlegroups.com
>>
>>
>>> 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 v8-users+u...@googlegroups.com.
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How to re-generate the .sln and the .vcxproj

2016-07-01 Thread Jochen Eisinger
Do you happen to have any gyp related environment variable set, e.g.
GYP_GENERATORS?

On Thu, Jun 30, 2016 at 2:25 PM Amaranth F  wrote:

> I've built v8 successfully some days ago, and today I'm following this
> post to add extra files to my project.
> http://v8project.blogspot.com/2016/02/v8-extras.html
>
> I added
> 'v8_extra_library_files': [
> '../test/cctest/test-extra.js',
> '../extra/vec2.js'
> ],
> to the standalone.gypi, and run the cmd:
> python gypfiles\gyp_v8
> Updating projects from gyp files...
>
> But the js2c.vcxproj file isn't modified at all. Even I deleted all the
> .sln and .vcxproj files, the gyp couldn't generate any files more.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] [v8-embedding] - Exposing result-set as an array in javascript

2016-06-29 Thread Jochen Eisinger
The enumerator callback returns what is used for eg
Object.getOwnPropertyNames(queryObj)

If you want queryObj["foo"] to return an array, just create on in the
getter callback and set it as return value. The getter takes a
PropertyCallbackInfo and Array drives from Value

Best
Jochen

Abhishek Singh  schrieb am Mi., 29. Juni 2016,
05:40:

> I'm exposing C++ objects in javascript as a map using
> NamedPropertyHandlerConfiguration. So operations like below in javascript
> are intercepted by Getter/Setter/Deleter callbacks as defined in v8 binding
> code.
>
> var obj = beer-sample["test_key2"]; // "beer-sample" is the keyword I'm
> exposing to JS from v8 binding code, it's encapsulating a C++ object
> beer-sample["test_key1"] = "test_value1";
> delete beer-sample["test_key3"];
>
> Next step in this use-case I'm looking at is to enumerate result-set
> obtained. I've looked at GenericNamedPropertyEnumeratorCallback but that
> doesn't look to be helpful in this case. Signature looks like below:
>
> void GenericNamedPropertyEnumeratorCallback(PropertyCallbackInfo&
> info);
>
> It doesn't allow to pass Local property to it like
> Getter/Setter/Deleter callback and I understand Enumerator Callback's
> purpose is different by looking at the unit tests within V8 code.
>
> ===
>
> Here is what I'm specifically after:
>
> In javascript a user could write something like this:
>
> ```
> var queryResult = queryObj["select * from `beer-sample`;"]
>
> var resultLength = queryResult.length;
>
> for (var i = 0; i < resultLength; i++) {
>//Do some computation and bookkeeping on each row
>log(queryResult[i]);
> }
> ```
>
> So queryResult needs to of type PropertyCallbackInfo type and I'm
> not sure correct way to do this. What would be the recommended to achieve
> this?
>
> Thanks,
> Abhishek
> --
> Thanks,
>
> Abhishek Singh
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Current value in interceptors

2016-06-27 Thread Jochen Eisinger
ReturnValue::Get only tells you what the return value you previously have
set is.

Ideally, you use a non-masking interceptor. In that case, you know that the
current value is not defined.

best
-jochen

On Mon, Jun 27, 2016 at 11:24 AM Ben Noordhuis  wrote:

> On Sun, Jun 26, 2016 at 3:04 PM, Danny Dorfman 
> wrote:
> > Hi there,
> >
> > I am writing some interceptor code for my objects, and I was wondering,
> > whether it was possible to know,
> > what is the current value for the property, before it's overwritten by
> > args.GetReturnValue().Set(whatever).
> >
> > I need something like args.GetReturnValue().Get(), but there is no such
> > method.
>
> A Get() method was added a few months ago.  It's available in V8 5.2.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Isolate::GetCurrent() inside a FunctionCallback returns NULL

2016-06-22 Thread Jochen Eisinger
I'm not aware of a bug. If you could file one with repro steps, that'd be
great!

Neil Moore <n...@cfconline.co.uk> schrieb am Mi., 22. Juni 2016, 15:48:

> Was any bug filed? This also describes what I'm seeing and I'd like to see
> any follow up discussion.
>
> Thanks.
>
>
> On Wednesday, 11 May 2016 06:05:14 UTC+1, Jochen Eisinger wrote:
>
>> Could you file a bug please, if possible with a complete reproduction
>> case?
>>
>> Thanks
>> Jochen
>>
>> Joris Wijnant <wijnan...@gmail.com> schrieb am Mo., 9. Mai 2016, 14:23:
>>
> Hi,
>>>
>>> I have the following callback definition.
>>>
>>> void Callback(const v8::FunctionCallbackInfo& info)
>>> {
>>> string strLogLine = "";
>>> v8::Isolate* pIsolate = info.GetIsolate();
>>>
>>>
>>> for (int i = 0; i < info.Length(); i++)
>>> {
>>> strLogLine += " " +
>>> string(*(v8::String::Utf8Value(info[i]->ToString(pIsolate;
>>> }
>>>
>>> Log('i', strLogLine);
>>> }
>>>
>>> It worked fine, till today.
>>> The callback is still called, but it crashes.
>>> because the Utf8Value internally calls the Isolate::GetCurrent(), which
>>> returns NULL. (check failed: isolate != NULL)
>>>
>>> Can someone tell me in what cases the Isolate::GetCurrent() will return
>>> NULL, and more precisely inside a callback function?
>>>
>>>
>>> the function to execute javascript, which will trigger the callback
>>>
>>>
>>> v8::Local CScriptContext::ExecuteScript(const ustring &
>>> strExpression, bool & bResult)
>>> {
>>> //Local variables
>>> v8::Local Result;
>>>
>>>
>>> v8::Locker lock(m_pIsolate); // v8::Isolate * m_pIsolate
>>>
>>> v8::EscapableHandleScope handle_scope(m_pIsolate);
>>>
>>> v8::Local Context = m_pContext->Get(m_pIsolate); //
>>> v8::Persistent m_pContext
>>>
>>> v8::Context::Scope contextScope(Context);
>>>
>>> v8::Local source =
>>> v8::String::NewFromUtf8(m_pIsolate, strExpression.c_str());
>>> v8::MaybeLocal script = v8::Script::Compile(Context, source);
>>>
>>> if (!script.IsEmpty())
>>> {
>>> v8::Local v8LocalScript = script.ToLocalChecked();
>>> Result = v8LocalScript->Run();
>>>
>>> if (Result.IsEmpty()) {
>>> VoxLog(M, 'W', F, L, "[JS][ScriptContext][ExecuteScript] result of the
>>> executed script is empty");
>>> bResult = false;
>>> }
>>> else
>>> {
>>> bResult = true;
>>> }
>>> }
>>> else
>>> {
>>>
>>> bResult = false;
>>> }
>>> return handle_scope.Escape(Result);
>>> }
>>>
>>> --
>>> --
>>> v8-users mailing list
>>>
>> v8-u...@googlegroups.com
>>
>>
>>> 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 v8-users+u...@googlegroups.com.
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Protecting IP

2016-06-22 Thread Jochen Eisinger
Have you considered using a less-easy-to-read format like asm.js, run a
obfuscator over the source, or put your IP into a binary node module?

On Tue, Jun 14, 2016, 3:33 PM Joe Bloggs 
wrote:

> Hi,
>
> My employer is looking to shift major development to node.js. Now, before
> you point out that this is the v8 mailing list, rest assured this message
> is pertinent to this list.
>
> My employer wants to protect their IP and not have it available as simple
> text files. We understand that a binary compilation is still hackable, that
> anything that executes on a remote machine can be reverse engineered, but
> we just want it to be non-trivial - no one should be able to merely open a
> text file and read the source code.
>
> I want to soundboard my current (extremely rudimentary) thoughts against
> you guys. The idea is to create a custom compilation of node and the v8
> engine, where the v8 engine has been modified in the following manner (very
> high level, lots of details need to be filled in):
>
> 1. v8 exposes a function 'ExecuteEncryptedString' which internally
> decrypts the string and passes on execution to already available functions.
>
> 2. There shall be no way for the 'require' syntax to load an encrypted
> file.
>
> 3. Any attempt to use console.log to dump the encrypt string merely dumps
> the encrypted string.
>
> 4. The overall outcome we are looking for is anyone can execute the code
> if they have the custom executable, but they can't decrypt it trivially.
> They will need to disassemble the executable.
>
> 5. We want this approach to be forward compatible. That's where we will
> need guidance from you guys on how to ensure that, to the extent reasonably
> possible, in the future we will be able to simply download the code for a
> new version of v8, and run a simple script to add the custom parts and
> create the custom executable. Of course, in the face of innovation for
> better performance etc. this might break, and that is understandable. We
> also understand we may need a separate discussion with the node.js guys.
>
> I would like to hear your thoughts on this. If you have better ideas on
> achieving this, if you see obvious loopholes in the approach, or you just
> want to share your thoughts, please feel free to provide constructive
> feedback.
>
> Regards,
>
> Simon
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Cross compile for RaspberryPi (arm64)

2016-06-20 Thread Jochen Eisinger
I suspect you have to pass -Dclang=0 to gyp_v8

Your compiler should define __ARCH64EL__ if you pass -m64

best
jochen

On Fri, Jun 17, 2016, 2:10 PM kin  wrote:

> Hi,
>
> I'm trying to cross compile the v8 engine. My host is an Ubuntu 14.04 x64,
> the target is arm64 and the toolchain is the
> gcc-linaro-arm-linux-gnueabihf-raspbian-x64 provided from the RaspberryPi
> tools.
>
> Here is what I do to compile :
>
> git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
> export PATH=`pwd`/depot_tools:$PATH
> fetch v8
> cd v8
> gypfiles/gyp_v8 -Dtarget_arch=arm64
> export CXX=/tools/rasp/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/
> bin/arm-linux-gnueabihf-g++
> export LINK=/tools/rasp/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/
> bin/arm-linux-gnueabihf-g++
> make arm64.release
>
> Here is the result :
>
> 14:02:00.377 
> PYTHONPATH="/var/lib/go-agent/pipelines/v8-raspberry/v8/tools/generate_shim_headers:/var/lib/go-agent/pipelines/v8-raspberry/v8/gypfiles::/var/lib/go-agent/pipelines/v8-raspberry/v8/tools/gyp/pylib:"
>  \
> 14:02:00.377  GYP_GENERATORS=make \
> 14:02:00.377  tools/gyp/gyp --generator-output="out" gypfiles/all.gyp \
> 14:02:00.377-Igypfiles/standalone.gypi --depth=. \
> 14:02:00.378-Dv8_target_arch=arm64 \
> 14:02:00.378 -Dtarget_arch=arm64 \
> 14:02:00.378 \
> 14:02:00.378-S.arm64.release  -Dv8_enable_backtrace=1 
> -Darm_fpu=default -Darm_float_abi=default
> 14:02:01.827 make[1]: entrant dans le répertoire « 
> /var/lib/go-agent/pipelines/v8-raspberry/v8/out »
> 14:02:01.828   CXX(target) 
> /var/lib/go-agent/pipelines/v8-raspberry/v8/out/arm64.release/obj.target/v8_base/src/accessors.o
> 14:02:01.925 In file included from .././src/globals.h:13:0,
> 14:02:01.925  from .././src/allocation.h:8,
> 14:02:01.925  from .././src/accessors.h:9,
> 14:02:01.925  from ../src/accessors.cc:5:
> 14:02:01.925 .././src/base/build_config.h:159:2: error: #error Target 
> architecture arm64 is only supported on arm64 and x64 host
> 14:02:01.925  #error Target architecture arm64 is only supported on arm64 and 
> x64 host
> 14:02:01.925   ^
> 14:02:02.704 In file included from .././src/globals.h:15:0,
> 14:02:02.706  from .././src/allocation.h:8,
> 14:02:02.706  from .././src/accessors.h:9,
> 14:02:02.706  from ../src/accessors.cc:5:
> 14:02:02.706 .././src/base/macros.h:217:29: error: static assertion failed: 
> sizeof(long) == sizeof(int64_t)
> 14:02:02.706  #define STATIC_ASSERT(test) static_assert(test, #test)
> 14:02:02.706  ^
> 14:02:02.706 .././src/arm64/constants-arm64.h:13:1: note: in expansion of 
> macro ‘STATIC_ASSERT’
> 14:02:02.706  STATIC_ASSERT(sizeof(long) == sizeof(int64_t));// 
> NOLINT(runtime/int)
> 14:02:02.706  ^
> 14:02:02.706 .././src/base/macros.h:217:29: error: static assertion failed: 
> sizeof(void *) == sizeof(int64_t)
> 14:02:02.706  #define STATIC_ASSERT(test) static_assert(test, #test)
> 14:02:02.706  ^
> 14:02:02.706 .././src/arm64/constants-arm64.h:14:1: note: in expansion of 
> macro ‘STATIC_ASSERT’
> 14:02:02.707  STATIC_ASSERT(sizeof(void *) == sizeof(int64_t));
> 14:02:02.707  ^
> 14:02:02.707 .././src/base/macros.h:217:29: error: static assertion failed: 
> sizeof(1L) == sizeof(int64_t)
> 14:02:02.707  #define STATIC_ASSERT(test) static_assert(test, #test)
> 14:02:02.707  ^
> 14:02:02.707 .././src/arm64/constants-arm64.h:16:1: note: in expansion of 
> macro ‘STATIC_ASSERT’
> 14:02:02.707  STATIC_ASSERT(sizeof(1L) == sizeof(int64_t));
> 14:02:02.707  ^
> 14:02:02.707 In file included from .././src/objects.h:29:0,
> 14:02:02.707  from .././src/heap/spaces.h:18,
> 14:02:02.707  from .././src/heap/heap.h:20,
> 14:02:02.707  from .././src/contexts.h:8,
> 14:02:02.707  from .././src/api.h:9,
> 14:02:02.707  from ../src/accessors.cc:7:
> 14:02:02.707 .././src/arm64/constants-arm64.h:68:36: error: left shift count 
> >= width of type [-Werror]
> 14:02:02.707  const int64_t kDSignMask = 0x1L << kDSignBit;
> 14:02:02.707 ^
> 14:02:02.708 .././src/arm64/constants-arm64.h:72:36: error: left shift count 
> >= width of type [-Werror]
> 14:02:02.708  const int64_t kXSignMask = 0x1L << kXSignBit;
> 14:02:02.708 ^
> 14:02:02.708 .././src/arm64/constants-arm64.h:76:40: error: left shift count 
> >= width of type [-Werror]
> 14:02:02.708  const int64_t kDQuietNanMask = 0x1L << kDQuietNanBit;
> 14:02:02.708 ^
> 14:02:02.995 In file included from .././src/globals.h:15:0,
> 14:02:02.995  from .././src/allocation.h:8,
> 14:02:02.995  from .././src/accessors.h:9,
> 

Re: [v8-users] Will Clone also clone private symbols?

2016-06-10 Thread Jochen Eisinger
Yes, it should work, but I'd recommend to just try it out to be sure

On Fri, Jun 10, 2016 at 4:36 AM Francisco Tolmasky 
wrote:

> Not much more to say, just curious if I do Clone whether I'll also get the
> private symbols.
>
> Thanks,
>
> Francisco
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] V8_WARN_UNUSED_RESULT on DefineOwnProperty?

2016-06-08 Thread Jochen Eisinger
The reason we added V8_WARN_UNUSED_RESULT was that ignoring an exception
will lead to lots of unexpected and hard to debug behavior. This annotation
helps embedders to not miss any place where you have to check for an
exception.

On Fri, Jun 3, 2016 at 7:27 PM Ben Noordhuis  wrote:

> On Fri, Jun 3, 2016 at 7:02 PM, Mark Logan  wrote:
> > I'm migrating some code to v8 5.0.71 (node v6.1.0), and replacing
> deprecated
> > calls to ForceSet with DefineOwnProperty/CreateDataProperty.
> >
> > I'm a little confused as to why V8_WARN_UNUSED_RESULT is present in these
> > declarations, when it wasn't present for ForceSet. Is there some new
> reason
> > why I should not ignore the return value? Or, is ignoring the return
> value
> > from DefineOwnProperty (or CreateDataProperty) no more dangerous than it
> was
> > to ignore the return value from ForceSet?
> >
> > Thanks,
> > Mark
>
> I believe V8_WARN_UNUSED_RESULT didn't exist when ForceSet() was
> added.  Ignoring the return value is probably no more dangerous, but:
>
> 1. DefineOwnProperty() fails when you try to set a property with a
> setter that throws an exception.
>
> 2. CreateDataProperty() and DefineOwnProperty() fail when the target
> object is not configurable, not extensible, frozen or sealed.
>
> IOW, there are quite a few failure modes.  You almost always want to
> check whether the operation succeeded and did what you thought it did.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] what are the official steps to bulid v8 on windows 8 using visual studio?

2016-06-08 Thread Jochen Eisinger
do the steps for MSVS outlined here work for you:
https://github.com/v8/v8/wiki/Building%20with%20Gyp

On Sat, Jun 4, 2016 at 6:11 PM blackthirt33n  wrote:

> what are the official steps to bulid v8 on windows 8 using visual studio?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Function line and column numbers with accessor callbacks in CpuProfileNode.

2016-06-06 Thread Jochen Eisinger
Yes, a reproduction case would help!

On Mon, Jun 6, 2016 at 2:48 AM Jane Chen <jxche...@gmail.com> wrote:

> I just tried compiling the script after the profiling is enabled.  Still
> getting 0 line and column numbers for functions with accessor callbacks.
> Any other ideas?  Shall I work on a standalone reproducing test case?
>
>
> On Thursday, June 2, 2016 at 11:31:44 PM UTC-7, Jochen Eisinger wrote:
>
>> I suspect that profiling wasn't enabled at the time the function was
>> compiled. In that case, the information required for mapping code positions
>> back to line numbers isn't available.
>>
>> Jane Chen <jxch...@gmail.com> schrieb am Do., 2. Juni 2016, 20:40:
>>
> Testing profiling against v8 4.6.88.
>>>
>>> I have functions that are exposed through accessor callbacks.  In the
>>> CpuProfileNode, the line and column numbers are 0 for these functions.  Is
>>> that expected?  Is there anything I can do to get the real line and column
>>> numbers?  Is this something fixed in a later v8 release?
>>>
>>> Thanks!
>>>
>>> --
>>> --
>>> v8-users mailing list
>>>
>> v8-u...@googlegroups.com
>>
>>
>>> 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 v8-users+u...@googlegroups.com.
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Why UTF surrogate pairs are modified by V8?

2016-06-03 Thread Jochen Eisinger
Your input string is encoded as CESU-8, not UTF-8. Older versions of V8
would silently accept that encoding, however, this leads to broken behavior
when interacting with libraries actually expecting UTF-8, so we changed our
implementation to actually require UTF-8, and invalid characters are
replaced when converting the string to our internal utf-16 representation.

Roman Budnyjj  schrieb am Do., 2. Juni 2016, 20:44:

> Hi guys,
> I'm trying to pass some string data to the JS functions, managed by V8.
> These strings are UTF8-encoded and contain surrogate pairs (Emoji).
> I've found, that for some reason new versions (5.1.281.56) of library
> modify these strings, so
> the contents of strings after conversion to std types back are not the
> same, as it was initially:
>
> #include 
>
> #include 
>
> #include 
> #include 
> #include 
> #include 
> #include 
>
>
> class SampleArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
>  public:
>   virtual void* Allocate(size_t length) {
> void* data = AllocateUninitialized(length);
> return data == NULL ? data : memset(data, 0, length);
>   }
>   virtual void* AllocateUninitialized(size_t length) { return
> malloc(length); }
>   virtual void Free(void* data, size_t) { free(data); }
> };
>
> int main(int argc, char* argv[]) {
> v8::V8::InitializeICU();
> v8::V8::InitializeExternalStartupData(argv[0]);
> v8::Platform* platform = v8::platform::CreateDefaultPlatform();
> v8::V8::InitializePlatform(platform);
> v8::V8::Initialize();
> v8::V8::SetFlagsFromCommandLine(, argv, true);
> SampleArrayBufferAllocator array_buffer_allocator;
> v8::Isolate::CreateParams create_params;
> create_params.array_buffer_allocator = _buffer_allocator;
> v8::Isolate* isolate = v8::Isolate::New(create_params);
> {
> v8::Isolate::Scope isolate_scope(isolate);
> v8::HandleScope handle_scope(isolate);
> // v8::Local context = CreateShellContext(isolate);
>
> // \uD83C\uDC32\
> std::string src("\355\240\274\355\260\262");
> std::string dst =
> *v8::String::Utf8Value(
> v8::String::NewFromUtf8(
> isolate, src.c_str(),
> v8::NewStringType::kNormal).ToLocalChecked());
> if (src != dst) {
> printf("!\n");
> }
> }
>
> return 0;
> }
>
> Both on my x64 machine and android-19 (ARM) it prints "!".
> I also want to mention, that on older versions of V8 (3.27.34) this string
> stays unmodified.
> Could you please describe the reasons of such behavior?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Function line and column numbers with accessor callbacks in CpuProfileNode.

2016-06-03 Thread Jochen Eisinger
I suspect that profiling wasn't enabled at the time the function was
compiled. In that case, the information required for mapping code positions
back to line numbers isn't available.

Jane Chen  schrieb am Do., 2. Juni 2016, 20:40:

> Testing profiling against v8 4.6.88.
>
> I have functions that are exposed through accessor callbacks.  In the
> CpuProfileNode, the line and column numbers are 0 for these functions.  Is
> that expected?  Is there anything I can do to get the real line and column
> numbers?  Is this something fixed in a later v8 release?
>
> Thanks!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   >