-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
vm: fix produceCachedData
#5343
Conversation
Fix segmentation faults when compiling the same code with `produceCachedData` option. V8 ignores the option when the code is in its compilation cache and does not return cached data. Added `cachedDataProduced` property to `v8.Script` to denote whether the cached data is produced successfully.
/cc @indutny |
reinterpret_cast<const char*>(cached_data->data), | ||
cached_data->length); | ||
args.This()->Set(env->cached_data_string(), buf.ToLocalChecked()); | ||
bool cached_data_produced = (cached_data != nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need in parens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. Thanks.
One nit, otherwise looking good. Going to give a try before landing, though. |
LGTM |
@jasnell this is not in v4.x, please remove the tag. |
@indutny the watch tag is for us to audit a commit to be backported |
@thealphanerd I'm just saying that it should be don't land on v4.x |
Ahhh... got it 😄 |
Landed in d5c04c3, thank you! |
Fix segmentation faults when compiling the same code with `produceCachedData` option. V8 ignores the option when the code is in its compilation cache and does not return cached data. Added `cachedDataProduced` property to `v8.Script` to denote whether the cached data is produced successfully. PR-URL: #5343 Reviewed-By: Fedor Indutny <[email protected]>
Changed tags myself. |
Argh, concurrency! :) |
@indutny would you be able to add a small sentence about why this commit is not an LTS candidate? |
Because |
@thealphanerd we may want to reconsider this a bit later, though. I just don't want to make a commitment to supporting this on a LTS level yet. If things will work out - there are no blockers in backporting all of code cache changes to v4.x and releasing them in next minor. |
Fix segmentation faults when compiling the same code with `produceCachedData` option. V8 ignores the option when the code is in its compilation cache and does not return cached data. Added `cachedDataProduced` property to `v8.Script` to denote whether the cached data is produced successfully. PR-URL: #5343 Reviewed-By: Fedor Indutny <[email protected]>
Fix segmentation faults when compiling the same code with
produceCachedData
option. V8 ignores the option when the code is in itscompilation cache and does not return cached data. Added
cachedDataProduced
property tov8.Script
to denote whether the cacheddata is produced successfully.