microsoft / v8-jsi

React Native V8 JSI adapter
Other
157 stars 36 forks source link

Implement hash for script versioning #124

Closed tudorms closed 2 years ago

tudorms commented 2 years ago

Since we hardcode the script version to "1" we could get into a state where we're using bytecode / script cache from an older bundle version. This change implements a simple hashing algorithm to version the scripts.

Bonus knowing the script is Ascii lets us skip a copy, and some generic cleanup.

Microsoft Reviewers: Open in CodeFlow
ghost commented 2 years ago

Hello @tudorms!

Because this pull request has the auto merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.