-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
lib: modify NativeModule to use compileFunction #23837
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
dc9f7e1
efc0892
19262a0
9ec01a2
382e3e8
72d542b
690fe8b
ab4d9ad
d2dcd54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1099,12 +1099,23 @@ void ContextifyContext::CompileFunction( | |
env->cached_data_string(), | ||
buf.ToLocalChecked()).IsNothing()) return; | ||
} | ||
|
||
// Report if cache was produced. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I looked into the implementation a bit, and I wonder if we can just wrap There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I just noticed that the docs of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (and the returned values are not tested either?) |
||
if (fun->Set( | ||
parsing_context, | ||
env->cached_data_produced_string(), | ||
Boolean::New(isolate, cached_data_produced)).IsNothing()) return; | ||
} | ||
|
||
// Report if cache was rejected. | ||
if (options == ScriptCompiler::kConsumeCodeCache) { | ||
if (fun->Set(parsing_context, | ||
env->cached_data_rejected_string(), | ||
Boolean::New(isolate, source.GetCachedData()->rejected)) | ||
.IsNothing()) | ||
return; | ||
} | ||
ryzokuken marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
args.GetReturnValue().Set(fun); | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.