I see: In particular I am using this in https://github.com/discourse/mini_racer
I had to make this very messy commit to work around it: https://github.com/discourse/mini_racer/commit/3c6832c07b2c6073e547de79da5badc00041ddad In particular I am now sadly "double" evaluating snapshots and warmups which is not ideal (snapshots and warmups are provided by end users) On Wed, Jun 27, 2018 at 3:52 PM, Yang Guo <[email protected]> wrote: > This API wasn't designed for a use case where we may or may not create a > snapshot, in order to catch misuse. Could you give a bit more details why > the script you embed may fail? We can definitely consider removing that > assertion. > > Cheers, > > Yang > > On Wed, Jun 27, 2018, 02:57 <[email protected]> wrote: > >> Hi there, >> >> This is probably a very trivial question but I am trying to understand >> the purpose of: >> >> https://cs.chromium.org/chromium/src/v8/src/api.cc?q= >> SnapshotCreator&sq=package:chromium&g=0&l=593 >> >> >> SnapshotCreator >> <https://cs.chromium.org/chromium/src/v8/include/v8.h?l=8488&ct=xref_jump_to_def&gsn=SnapshotCreator>::~SnapshotCreator >> >> <https://cs.chromium.org/chromium/src/v8/src/api.cc?l=591&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fv8%252Fsrc%252Fapi.cc%2523soPvzld%25252BUQWNJunU2H9G8iDKGNBCECVM1zU5PP71hao%25253D&gsn=~SnapshotCreator&ct=xref_usages>() >> { SnapshotCreatorData* data = SnapshotCreatorData >> <https://cs.chromium.org/chromium/src/v8/src/api.cc?l=542&ct=xref_jump_to_def&gsn=SnapshotCreatorData>::cast(data_ >> >> <https://cs.chromium.org/chromium/src/v8/include/v8.h?l=8587&ct=xref_jump_to_def&gsn=data_>); >> DCHECK >> <https://cs.chromium.org/chromium/src/v8/src/base/logging.h?l=63&ct=xref_jump_to_def&gsn=DCHECK>(data >> >> <https://cs.chromium.org/chromium/src/v8/src/api.cc?l=592&ct=xref_jump_to_def&gsn=data>->created_); >> // <--- this check Isolate* isolate = data >> <https://cs.chromium.org/chromium/src/v8/src/api.cc?l=592&ct=xref_jump_to_def&gsn=data>->isolate_ >> >> <https://cs.chromium.org/chromium/src/v8/src/api.cc?l=554&ct=xref_jump_to_def&gsn=isolate_>; >> isolate->Exit >> <https://cs.chromium.org/chromium/src/v8/src/api.cc?l=8378&ct=xref_jump_to_def&gsn=Exit>(); >> isolate->Dispose(); delete data >> <https://cs.chromium.org/chromium/src/v8/src/api.cc?l=592&ct=xref_jump_to_def&gsn=data>;} >> From usage of SnapshotCreator there are cases where we can not create >> snapshot so created_ is going to be false. This is causing my library to >> fail when compiled with debug enabled. >> Was wondering, why is that check there? If we fail to create a shapshot >> should I just go ahead and create a blank one anyway? Or perhaps only use a >> snapshot creator if I know I have good script? >> >> >> >> -- >> -- >> 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. >> > -- > > > > * • * > *Yang Guo** • **Google Germany GmbH* > * • *Erika-Mann-Str. 33 > <https://maps.google.com/?q=Erika-Mann-Str.+33+%C2%A0%E2%80%A2+%C2%A0+80636+Munich&entry=gmail&source=g> > * • > <https://maps.google.com/?q=Erika-Mann-Str.+33+%C2%A0%E2%80%A2+%C2%A0+80636+Munich&entry=gmail&source=g>*80636 > Munich > <https://maps.google.com/?q=Erika-Mann-Str.+33+%C2%A0%E2%80%A2+%C2%A0+80636+Munich&entry=gmail&source=g> > > • [email protected] > > > Geschäftsführer: Paul Manicle, Halimah DeLaine Prado > > Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: > Hamburg > > Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, > leiten Sie diese bitte nicht weiter, informieren Sie den Absender und > löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is > confidential. If you are not the right addressee please do not forward it, > please inform the sender, and please erase this e-mail including any > attachments. Thanks. > > -- > -- > v8-dev mailing list > [email protected] > http://groups.google.com/group/v8-dev > --- > You received this message because you are subscribed to a topic in the > Google Groups "v8-dev" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/v8-dev/jatawFG_lus/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- 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.
