I was trying to use snapshot utility in V8 to speed up my application startup performence. As it is pointed out in the V8 blog, using snapshot makes it possible to skip over the startup time incurred by some initialization.
StartupData snapshotDataBlob = V8::CreateSnapshotDataBlob(myScript);
I used CreateSnapshotDataBlob to create a snapshot, and I got snapshotDataBlob.data == NULL, which means a failure.
So my question is, under what circumstances will CreateSnapshotDataBlob failed?