Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Issue 1185643004: Add d8 API for spawning function on a new thread. (Closed)

Created:
5 years, 6 months ago by binji
Modified:
5 years, 6 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Add d8 API for spawning function on a new thread. This API closely matches the Worker API. The differences: 1) The argument to the Worker constructor is a function to run, not a script. 2) Receiving a message from a worker is a synchronous API (as there is no event loop). The serialization done here is not robust as the real DOM implementation. For example, recursive data structures or otherwise duplicated objects are not allowed. BUG=none R=jochen@chromium.org LOG=n Committed: https://crrev.com/3d98b956b56fa283b40913788ff760022d478812 Cr-Commit-Position: refs/heads/master@{#29126}

Patch Set 1 #

Patch Set 2 : . #

Total comments: 3

Patch Set 3 : try to match Worker API #

Patch Set 4 : add synchronous getMessage, other cleanup #

Patch Set 5 : fix context bugs #

Patch Set 6 : fix gcc build #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+827 lines, -7 lines) Patch
M src/d8.h View 1 2 3 6 chunks +114 lines, -0 lines 2 comments Download
M src/d8.cc View 1 2 3 4 5 11 chunks +582 lines, -7 lines 0 comments Download
A test/mjsunit/d8-worker.js View 1 2 3 4 5 1 chunk +131 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (4 generated)
binji
PTAL https://codereview.chromium.org/1185643004/diff/20001/src/d8.cc File src/d8.cc (right): https://codereview.chromium.org/1185643004/diff/20001/src/d8.cc#newcode1431 src/d8.cc:1431: static const char format[] = "JSON.stringify((%s).call(this, sab));"; Better ...
5 years, 6 months ago (2015-06-15 19:11:48 UTC) #1
jochen (gone - plz use gerrit)
thx for the patch. I think it would be nice if the API was closer ...
5 years, 6 months ago (2015-06-16 13:29:18 UTC) #2
Jakob Kummerow
DBC: > var w = new Worker('path/to/script.js'); This looks like it would require separate .js ...
5 years, 6 months ago (2015-06-16 14:03:36 UTC) #3
jochen (gone - plz use gerrit)
On 2015/06/16 at 14:03:36, jkummerow wrote: > DBC: > > > var w = new ...
5 years, 6 months ago (2015-06-16 14:04:21 UTC) #4
binji
On 2015/06/16 at 14:04:21, jochen wrote: > On 2015/06/16 at 14:03:36, jkummerow wrote: > > ...
5 years, 6 months ago (2015-06-17 17:20:24 UTC) #5
binji
On 2015/06/17 at 17:20:24, binji wrote: > On 2015/06/16 at 14:04:21, jochen wrote: > > ...
5 years, 6 months ago (2015-06-17 23:01:59 UTC) #6
jochen (gone - plz use gerrit)
what about just adding v8::JSON::Stringify() and use parse/stringify for serialization?
5 years, 6 months ago (2015-06-18 13:01:30 UTC) #7
binji
On 2015/06/18 at 13:01:30, jochen wrote: > what about just adding v8::JSON::Stringify() and use parse/stringify ...
5 years, 6 months ago (2015-06-18 15:28:11 UTC) #8
jochen (gone - plz use gerrit)
fair enough lgtm
5 years, 6 months ago (2015-06-18 15:32:54 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1185643004/100001
5 years, 6 months ago (2015-06-18 19:27:54 UTC) #12
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 6 months ago (2015-06-18 19:46:19 UTC) #13
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/3d98b956b56fa283b40913788ff760022d478812 Cr-Commit-Position: refs/heads/master@{#29126}
5 years, 6 months ago (2015-06-18 19:46:33 UTC) #14
binji
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/1192193002/ by binji@chromium.org. ...
5 years, 6 months ago (2015-06-18 20:44:38 UTC) #15
Benedikt Meurer
https://codereview.chromium.org/1185643004/diff/100001/src/d8.h File src/d8.h (right): https://codereview.chromium.org/1185643004/diff/100001/src/d8.h#newcode13 src/d8.h:13: #include "src/unbound-queue.h" Don't use the UnboundedQueue. It's only purpose ...
5 years, 6 months ago (2015-06-19 05:00:12 UTC) #17
binji
https://codereview.chromium.org/1185643004/diff/100001/src/d8.h File src/d8.h (right): https://codereview.chromium.org/1185643004/diff/100001/src/d8.h#newcode13 src/d8.h:13: #include "src/unbound-queue.h" On 2015/06/19 at 05:00:12, Benedikt Meurer wrote: ...
5 years, 6 months ago (2015-06-19 06:02:04 UTC) #18
Yang
Not specifically about this CL, but at some point we should clean up d8 again. ...
5 years, 6 months ago (2015-06-19 06:13:01 UTC) #20
jochen (gone - plz use gerrit)
On 2015/06/19 at 06:13:01, yangguo wrote: > Not specifically about this CL, but at some ...
5 years, 6 months ago (2015-06-19 06:32:16 UTC) #21
jochen (gone - plz use gerrit)
binji@ would you mind uploading the reland patch to a fresh code review?
5 years, 6 months ago (2015-06-19 06:32:55 UTC) #22
binji
5 years, 6 months ago (2015-06-19 06:33:55 UTC) #23
Message was sent while issue was closed.
On 2015/06/19 at 06:32:55, jochen wrote:
> binji@ would you mind uploading the reland patch to a fresh code review?

Uploaded it here: https://codereview.chromium.org/1195613003

Powered by Google App Engine
This is Rietveld 408576698