http://codereview.chromium.org/2566002/diff/12001/4
File include/v8.h (right):

http://codereview.chromium.org/2566002/diff/12001/4#newcode2387
include/v8.h:2387: /**
On 2010/06/03 17:02:09, iposva wrote:
What bothers me about this API is the implicit chaining of isolates.
Basically
you have to ensure that a thread exits the current isolate before
starting to
use a new isolate, but unfortunately with this API you can't. There is
a
reference to the first isolate created by the thread at the bottom of
the chain.

Not sure I have a good solution for this though.

For example:

...
<code initializing V8>
// If the lines below are missing, the isolate initializing V8
// cannot be disposed.
V8::Isolate::GetCurrent()->Exit();  // oops, private api
...
while (should_continue()) {
   Request* req = Request::getNext();
   V8::Isolate::Scope(req->getIsolate());
   ...
   <handle request in req specific isolate>
   ...
}
...


We decided to expose Enter/Exit back as they were in the initial patch
set.

http://codereview.chromium.org/2566002/diff/12001/4#newcode2424
include/v8.h:2424: static Isolate* New();
On 2010/06/03 16:47:50, Dmitry Titov wrote:
Do we also need New(ResourceConstraints*) variant?

Yes, I'm going to add that later. I don't want to specify termination
conditions yet.

http://codereview.chromium.org/2566002/diff/12001/4#newcode2424
include/v8.h:2424: static Isolate* New();
On 2010/06/03 17:02:09, iposva wrote:
How do you set per isolate specific ResourceConstraints using this
API? I could
imagine that different isolates want to allow different heap sizes.
How about
adding a  ResourceConstraints parameter?

This is exactly what we're going to do. See my reply to Dmitry's
comment.

http://codereview.chromium.org/2566002/diff/12001/4#newcode2433
include/v8.h:2433: * Methods below this point require holding a lock in
multi-threaded
On 2010/06/03 17:02:09, iposva wrote:
in multi-threaded -> in a multi-threaded

Done.

http://codereview.chromium.org/2566002/diff/12001/4#newcode2441
include/v8.h:2441: void Dispose();
On 2010/06/03 17:02:09, iposva wrote:
Do you assert in debug mode that Dispose is not called on an isolate
still
chained?

Yes, this is what we plan to do. In general, we're going to add a lot of
debug checks to ensure transition to multi-isolate world is smooth (for
those who need it).

http://codereview.chromium.org/2566002/show

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to