Re: [v8-users] Arraybuffer
Ok but then can someone give me a big picture of the directories ? And how the code is generally structured ? Or how is ArrayBufferBuilder:append called ? On Thu, 20 Sep 2018 at 00:14, Peter Schow wrote: > On Wed, Sep 19, 2018 at 2:36 PM dan Med wrote: > > This is how I see it atm > > Each tab is a process that is composed of several threads, this process > is sandboxed with the Windows kernel security ( on Windows ) > > Then we have WebKit which is the rendered thread inside of this main tab > (thread) which as the name implies will render the page. > > When in the renderer process is v8 called ? > > Or when WebKit is executing UI things v8 is also running JavaScript code > ? > > This mailing list is about V8 itself, not arbitrary consumers (there > are many) of V8. Do you understand the difference? V8 has no notion > of "tabs", "WebKit", "renderer process", or "UI". I suggest you find > another place to ask your questions. > > -- > -- > 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] Arraybuffer
On Wed, Sep 19, 2018 at 2:36 PM dan Med wrote: > This is how I see it atm > Each tab is a process that is composed of several threads, this process is > sandboxed with the Windows kernel security ( on Windows ) > Then we have WebKit which is the rendered thread inside of this main tab > (thread) which as the name implies will render the page. > When in the renderer process is v8 called ? > Or when WebKit is executing UI things v8 is also running JavaScript code ? This mailing list is about V8 itself, not arbitrary consumers (there are many) of V8. Do you understand the difference? V8 has no notion of "tabs", "WebKit", "renderer process", or "UI". I suggest you find another place to ask your questions. -- -- 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] Arraybuffer
This is how I see it atm Each tab is a process that is composed of several threads, this process is sandboxed with the Windows kernel security ( on Windows ) Then we have WebKit which is the rendered thread inside of this main tab (thread) which as the name implies will render the page. When in the renderer process is v8 called ? Or when WebKit is executing UI things v8 is also running JavaScript code ? Last thing is when ArrayBufferBuilder:append is called ? On Wed, 19 Sep 2018 at 18:39, dan Med wrote: > Ok so when is arraybufferbuilde:append called ? > > On Wed, 19 Sep 2018 at 12:36, @soylentgraham > wrote: > >> Not sure where to start with this message >> >> a) Not even vaguely related to the original topic, you should start a new >> thread when the topic is wildly different. >> b) Do not start a new thread. >> c) This code is from libav (or actually, maybe ffmpeg). av_XXX are >> macros, functions and other values. The AV prefix is a hint to the user >> (you) that it's part of the av library. AV stands for audio/visual (or I >> suppose, audio/video these days) >> d) This is a question that should be on www.stackoverflow.com >> e) Please do not reply to this message. (at least regarding this new >> topic) >> >> >> On Tuesday, 18 September 2018 21:15:42 UTC+1, dan Med wrote: >> >>> I was reading this code but i can't figure outwhat av_..._.. stands for >>> is it already opening the connection here? >>> >>> static int tcp_open(URLContext *h, const char *uri, int flags){struct >>> addrinfo hints = { 0 }, *ai, *cur_ai;int port, fd = -1;TCPContext >>> *s = h->priv_data;const char *p;char buf[256];int ret;char >>> hostname[1024],proto[1024],path[1024];char portstr[10]; >>> s->open_timeout = 500;av_url_split(proto, sizeof(proto), NULL, 0, >>> hostname, sizeof(hostname),&port, path, sizeof(path), uri);if >>> (strcmp(proto, "tcp"))return AVERROR(EINVAL);if (port <= 0 || >>> port >= 65536) {av_log(h, AV_LOG_ERROR, "Port missing in uri\n"); >>> return AVERROR(EINVAL);}p = strchr(uri, '?');if (p) { >>> if (av_find_info_tag(buf, sizeof(buf), "listen", p)) {char >>> *endptr = NULL;s->listen = strtol(buf, &endptr, 10); >>> /* assume if no digits were found it is a request to enable it */ >>> if (buf == endptr)s->listen = 1;}if >>> (av_find_info_tag(buf, sizeof(buf), "timeout", p)) { >>> s->rw_timeout = strtol(buf, NULL, 10);}if >>> (av_find_info_tag(buf, sizeof(buf), "listen_timeout", p)) { >>> s->listen_timeout = strtol(buf, NULL, 10);}}if >>> (s->rw_timeout >= 0) {s->open_timeout =h->rw_timeout = >>> s->rw_timeout;}hints.ai_family = AF_UNSPEC;hints.ai_socktype = >>> SOCK_STREAM;snprintf(portstr, sizeof(portstr), "%d", port);if >>> (s->listen)hints.ai_flags |= AI_PASSIVE;if (!hostname[0]) >>> ret = getaddrinfo(NULL, portstr, &hints, &ai);elseret = >>> getaddrinfo(hostname, portstr, &hints, &ai);if (ret) {av_log(h, >>> AV_LOG_ERROR, "Failed to resolve hostname %s: %s\n", >>> hostname, gai_strerror(ret));return AVERROR(EIO);} >>> cur_ai = ai; restart:#if HAVE_STRUCT_SOCKADDR_IN6// workaround for IOS9 >>> getaddrinfo in IPv6 only network use hardcode IPv4 address can not resolve >>> port number.if (cur_ai->ai_family == AF_INET6){struct >>> sockaddr_in6 * sockaddr_v6 = (struct sockaddr_in6 *)cur_ai->ai_addr; >>> if (!sockaddr_v6->sin6_port){sockaddr_v6->sin6_port = >>> htons(port);}}#endiffd = ff_socket(cur_ai->ai_family, >>> cur_ai->ai_socktype, cur_ai->ai_protocol); >>> if (fd < 0) {ret = ff_neterrno();goto fail;}/* Set >>> the socket's send or receive buffer sizes, if specified. If >>> unspecified or setting fails, system default is used. */if >>> (s->recv_buffer_size > 0) {setsockopt (fd, SOL_SOCKET, SO_RCVBUF, >>> &s->recv_buffer_size, sizeof (s->recv_buffer_size));}if >>> (s->send_buffer_size > 0) {setsockopt (fd, SOL_SOCKET, SO_SNDBUF, >>> &s->send_buffer_size, sizeof (s->send_buffer_size));}if >>> (s->tcp_nodelay > 0) {setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, >>> &s->tcp_nodelay, sizeof (s->tcp_nodelay));}if (s->listen == 2) { >>> // multi-clientif ((ret = ff_listen(fd, cur_ai->ai_addr, >>> cur_ai->ai_addrlen)) < 0)goto fail1;} else if (s->listen == >>> 1) {// single clientif ((ret = ff_listen_bind(fd, >>> cur_ai->ai_addr, cur_ai->ai_addrlen, >>> s->listen_timeout, h)) < 0)goto fail1;// Socket >>> descriptor already closed here. Safe to overwrite
Re: [v8-users] Arraybuffer
Ok so when is arraybufferbuilde:append called ? On Wed, 19 Sep 2018 at 12:36, @soylentgraham wrote: > Not sure where to start with this message > > a) Not even vaguely related to the original topic, you should start a new > thread when the topic is wildly different. > b) Do not start a new thread. > c) This code is from libav (or actually, maybe ffmpeg). av_XXX are macros, > functions and other values. The AV prefix is a hint to the user (you) that > it's part of the av library. AV stands for audio/visual (or I suppose, > audio/video these days) > d) This is a question that should be on www.stackoverflow.com > e) Please do not reply to this message. (at least regarding this new topic) > > > On Tuesday, 18 September 2018 21:15:42 UTC+1, dan Med wrote: > >> I was reading this code but i can't figure outwhat av_..._.. stands for >> is it already opening the connection here? >> >> static int tcp_open(URLContext *h, const char *uri, int flags){struct >> addrinfo hints = { 0 }, *ai, *cur_ai;int port, fd = -1;TCPContext *s >> = h->priv_data;const char *p;char buf[256];int ret;char >> hostname[1024],proto[1024],path[1024];char portstr[10]; >> s->open_timeout = 500;av_url_split(proto, sizeof(proto), NULL, 0, >> hostname, sizeof(hostname),&port, path, sizeof(path), uri);if >> (strcmp(proto, "tcp"))return AVERROR(EINVAL);if (port <= 0 || >> port >= 65536) {av_log(h, AV_LOG_ERROR, "Port missing in uri\n"); >> return AVERROR(EINVAL);}p = strchr(uri, '?');if (p) { >> if (av_find_info_tag(buf, sizeof(buf), "listen", p)) {char >> *endptr = NULL;s->listen = strtol(buf, &endptr, 10); >> /* assume if no digits were found it is a request to enable it */ >> if (buf == endptr)s->listen = 1;}if >> (av_find_info_tag(buf, sizeof(buf), "timeout", p)) { >> s->rw_timeout = strtol(buf, NULL, 10);}if >> (av_find_info_tag(buf, sizeof(buf), "listen_timeout", p)) { >> s->listen_timeout = strtol(buf, NULL, 10);}}if >> (s->rw_timeout >= 0) {s->open_timeout =h->rw_timeout = >> s->rw_timeout;}hints.ai_family = AF_UNSPEC;hints.ai_socktype = >> SOCK_STREAM;snprintf(portstr, sizeof(portstr), "%d", port);if >> (s->listen)hints.ai_flags |= AI_PASSIVE;if (!hostname[0]) >> ret = getaddrinfo(NULL, portstr, &hints, &ai);elseret = >> getaddrinfo(hostname, portstr, &hints, &ai);if (ret) {av_log(h, >> AV_LOG_ERROR, "Failed to resolve hostname %s: %s\n", >> hostname, gai_strerror(ret));return AVERROR(EIO);}cur_ai >> = ai; restart:#if HAVE_STRUCT_SOCKADDR_IN6// workaround for IOS9 >> getaddrinfo in IPv6 only network use hardcode IPv4 address can not resolve >> port number.if (cur_ai->ai_family == AF_INET6){struct >> sockaddr_in6 * sockaddr_v6 = (struct sockaddr_in6 *)cur_ai->ai_addr; >> if (!sockaddr_v6->sin6_port){sockaddr_v6->sin6_port = >> htons(port);}}#endiffd = ff_socket(cur_ai->ai_family, >>cur_ai->ai_socktype, cur_ai->ai_protocol); >> if (fd < 0) {ret = ff_neterrno();goto fail;}/* Set >> the socket's send or receive buffer sizes, if specified. If >> unspecified or setting fails, system default is used. */if >> (s->recv_buffer_size > 0) {setsockopt (fd, SOL_SOCKET, SO_RCVBUF, >> &s->recv_buffer_size, sizeof (s->recv_buffer_size));}if >> (s->send_buffer_size > 0) {setsockopt (fd, SOL_SOCKET, SO_SNDBUF, >> &s->send_buffer_size, sizeof (s->send_buffer_size));}if >> (s->tcp_nodelay > 0) {setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, >> &s->tcp_nodelay, sizeof (s->tcp_nodelay));}if (s->listen == 2) { >>// multi-clientif ((ret = ff_listen(fd, cur_ai->ai_addr, >> cur_ai->ai_addrlen)) < 0)goto fail1;} else if (s->listen == >> 1) {// single clientif ((ret = ff_listen_bind(fd, >> cur_ai->ai_addr, cur_ai->ai_addrlen, >> s->listen_timeout, h)) < 0)goto fail1;// Socket >> descriptor already closed here. Safe to overwrite to client one.fd = >> ret;} else {if ((ret = ff_listen_connect(fd, cur_ai->ai_addr, >> cur_ai->ai_addrlen, s->open_timeout / >> 1000, h, !!cur_ai->ai_next)) < 0) {if (ret == AVERROR_EXIT) >> goto fail1;elsegoto fail;} >> }h->is_streamed = 1;s->fd = fd;freeaddrinfo(ai);return 0; >> fail:if (cur_ai->ai_next) {/* Retry with the next sockaddr */ >> cur_ai = cur_ai->ai_next;if (fd >= 0) >> closesocket(fd);
Re: [v8-users] Arraybuffer
Not sure where to start with this message a) Not even vaguely related to the original topic, you should start a new thread when the topic is wildly different. b) Do not start a new thread. c) This code is from libav (or actually, maybe ffmpeg). av_XXX are macros, functions and other values. The AV prefix is a hint to the user (you) that it's part of the av library. AV stands for audio/visual (or I suppose, audio/video these days) d) This is a question that should be on www.stackoverflow.com e) Please do not reply to this message. (at least regarding this new topic) On Tuesday, 18 September 2018 21:15:42 UTC+1, dan Med wrote: > > I was reading this code but i can't figure outwhat av_..._.. stands for > is it already opening the connection here? > > static int tcp_open(URLContext *h, const char *uri, int flags){struct > addrinfo hints = { 0 }, *ai, *cur_ai;int port, fd = -1;TCPContext *s > = h->priv_data;const char *p;char buf[256];int ret;char > hostname[1024],proto[1024],path[1024];char portstr[10]; > s->open_timeout = 500;av_url_split(proto, sizeof(proto), NULL, 0, > hostname, sizeof(hostname),&port, path, sizeof(path), uri);if > (strcmp(proto, "tcp"))return AVERROR(EINVAL);if (port <= 0 || > port >= 65536) {av_log(h, AV_LOG_ERROR, "Port missing in uri\n"); >return AVERROR(EINVAL);}p = strchr(uri, '?');if (p) { > if (av_find_info_tag(buf, sizeof(buf), "listen", p)) {char > *endptr = NULL;s->listen = strtol(buf, &endptr, 10); > /* assume if no digits were found it is a request to enable it */ > if (buf == endptr)s->listen = 1;}if > (av_find_info_tag(buf, sizeof(buf), "timeout", p)) {s->rw_timeout > = strtol(buf, NULL, 10);}if (av_find_info_tag(buf, > sizeof(buf), "listen_timeout", p)) {s->listen_timeout = > strtol(buf, NULL, 10);}}if (s->rw_timeout >= 0) { > s->open_timeout =h->rw_timeout = s->rw_timeout;} > hints.ai_family = AF_UNSPEC;hints.ai_socktype = SOCK_STREAM; > snprintf(portstr, sizeof(portstr), "%d", port);if (s->listen) > hints.ai_flags |= AI_PASSIVE;if (!hostname[0])ret = > getaddrinfo(NULL, portstr, &hints, &ai);elseret = > getaddrinfo(hostname, portstr, &hints, &ai);if (ret) {av_log(h, > AV_LOG_ERROR, "Failed to resolve hostname %s: %s\n", >hostname, gai_strerror(ret));return AVERROR(EIO);}cur_ai = > ai; restart:#if HAVE_STRUCT_SOCKADDR_IN6// workaround for IOS9 > getaddrinfo in IPv6 only network use hardcode IPv4 address can not resolve > port number.if (cur_ai->ai_family == AF_INET6){struct > sockaddr_in6 * sockaddr_v6 = (struct sockaddr_in6 *)cur_ai->ai_addr; > if (!sockaddr_v6->sin6_port){sockaddr_v6->sin6_port = > htons(port);}}#endiffd = ff_socket(cur_ai->ai_family, > cur_ai->ai_socktype, cur_ai->ai_protocol);if > (fd < 0) {ret = ff_neterrno();goto fail;}/* Set the > socket's send or receive buffer sizes, if specified. If unspecified or > setting fails, system default is used. */if (s->recv_buffer_size > 0) { > setsockopt (fd, SOL_SOCKET, SO_RCVBUF, &s->recv_buffer_size, sizeof > (s->recv_buffer_size));}if (s->send_buffer_size > 0) { > setsockopt (fd, SOL_SOCKET, SO_SNDBUF, &s->send_buffer_size, sizeof > (s->send_buffer_size));}if (s->tcp_nodelay > 0) {setsockopt > (fd, IPPROTO_TCP, TCP_NODELAY, &s->tcp_nodelay, sizeof (s->tcp_nodelay)); > }if (s->listen == 2) {// multi-clientif ((ret = > ff_listen(fd, cur_ai->ai_addr, cur_ai->ai_addrlen)) < 0)goto > fail1;} else if (s->listen == 1) {// single clientif > ((ret = ff_listen_bind(fd, cur_ai->ai_addr, cur_ai->ai_addrlen, >s->listen_timeout, h)) < 0)goto fail1; > // Socket descriptor already closed here. Safe to overwrite to client one. > fd = ret;} else {if ((ret = ff_listen_connect(fd, > cur_ai->ai_addr, cur_ai->ai_addrlen, > s->open_timeout / 1000, h, !!cur_ai->ai_next)) < 0) {if (ret == > AVERROR_EXIT)goto fail1;elsegoto > fail;}}h->is_streamed = 1;s->fd = fd; > freeaddrinfo(ai);return 0; fail:if (cur_ai->ai_next) {/* > Retry with the next sockaddr */cur_ai = cur_ai->ai_next;if > (fd >= 0)closesocket(fd);ret = 0;goto restart; > } fail1:if (fd >= 0)closesocket(fd);freeaddrinfo(ai); > return ret;} > > > Il giorno mar 18 set 2018 alle ore 21:54 dan M