I've looked closer at Isolate::Init, and it seems that it can only return false
in combination of an FatalOutOfMemory, which causes a crash before actually
returning. Nevertheless I added code to handle the case we fail to initialize
from the snapshot and have a script embedded. We now simply crash with a
V8_Fatal.


https://codereview.chromium.org/949623006/diff/1/src/api.cc
File src/api.cc (right):

https://codereview.chromium.org/949623006/diff/1/src/api.cc#newcode6529
src/api.cc:6529: if (!params.enable_serializer) {
On 2015/02/24 15:16:31, vogelheim wrote:
Why the check for !enable_serializer?

The comment in v8.h says "This flag currently renders the Isolate
unusable",
which both explains and not explains the check.

You are right. In fact, there is no point in having this flag anymore.
The only user of this flag is in V8::CreateSnapshotDataBlob. I'll remove
it.

https://codereview.chromium.org/949623006/diff/1/src/snapshot.h
File src/snapshot.h (right):

https://codereview.chromium.org/949623006/diff/1/src/snapshot.h#newcode39
src/snapshot.h:39: static bool HaveASnapshotToStartFrom(Isolate*
isolate) {
On 2015/02/24 15:16:31, vogelheim wrote:
nitpick: This (and the methods below) would conceptually be a better
fit as
methods on Isolate.

Previously, these methods used to answer a question about the static
snapshot
data. But now, they answer a question about the state of the given
Isolate.

Done.

https://codereview.chromium.org/949623006/diff/1/src/snapshot.h#newcode40
src/snapshot.h:40: // Do not use snapshots if the isolate is used to
create snapshots.
On 2015/02/24 15:16:31, vogelheim wrote:
I think this comment explains the enable_serializer check earlier.
Maybe move it
there?

Acknowledged.

https://codereview.chromium.org/949623006/diff/1/test/cctest/test-serialize.cc
File test/cctest/test-serialize.cc (right):

https://codereview.chromium.org/949623006/diff/1/test/cctest/test-serialize.cc#newcode708
test/cctest/test-serialize.cc:708: // Disable experimental natives that
are loaded after desrialization.
On 2015/02/24 15:16:31, vogelheim wrote:
nitpick: desrialization => deserialization

Done.

https://codereview.chromium.org/949623006/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to