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: /** 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> ... } ... http://codereview.chromium.org/2566002/diff/12001/4#newcode2424 include/v8.h:2424: static Isolate* New(); 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? http://codereview.chromium.org/2566002/diff/12001/4#newcode2433 include/v8.h:2433: * Methods below this point require holding a lock in multi-threaded in multi-threaded -> in a multi-threaded http://codereview.chromium.org/2566002/diff/12001/4#newcode2441 include/v8.h:2441: void Dispose(); Do you assert in debug mode that Dispose is not called on an isolate still chained? http://codereview.chromium.org/2566002/show -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
