Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unity]去掉SnapshotBlob.h #1477

Closed
chexiongsheng opened this issue Aug 22, 2023 · 0 comments
Closed

[Unity]去掉SnapshotBlob.h #1477

chexiongsheng opened this issue Aug 22, 2023 · 0 comments
Assignees

Comments

@chexiongsheng
Copy link
Collaborator

detail | 详细描述

SnapshotBlob.h是把snapshot_blob.bin内嵌到代码里头,其实这个步骤v8本身就已经支持了,见:puerts/backend-v8#11

配置v8_use_external_startup_data=false,v8会做类似SnapshotBlob.h的事情,比我们SnapshotBlob.h好的是:
1、官方内嵌到静态库、动态库里,没那么容易出错,典型的例子是这个issue:#1471 ,里头尝试编译ue的mac m1版本时,不知道要修改SnapshotBlob.h的指向而崩溃;
2、我们代码也能够简化

修改:
1、切换使用最新版本的v8,已经修改为v8_use_external_startup_data=false
2、去掉根据条件编译宏include SnapshotBlob.h;
3、V8::SetSnapshotDataBlob调用去掉;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants