V8 now provides its own "console" object, with the usual methods installed
on it. Does it not serve your needs?

You can override it by providing a ConsoleDelegate via the debug interface.
The d8 shell (src/d8.cc) provides an example.

On Mon, Jun 25, 2018 at 5:52 PM zwc <wanzhichun1...@gmail.com> wrote:

> Hello,
> we are working on upgrading v8 from 5.3 to 6.7-lkgr.
> But I recently found a strange behavior for one global object with name
> "console".
> In the old version, we have a global object "console" for logging info.
> But when upgraded to 6.7, the "console"'s callbacks functions won't get
> called. I tested if I change the name from "console" to something else, it
> will work as usual.
> I am feeling like that "console"seems to become a reserved word for the
> newer version?
> May I know if this is expected? And if true, is there any workaround to
> overwrite this behavior? we would want to keep our old "console" name.
>
> Thank you so much!
>
> --
> --
> 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.

Reply via email to