src: do not pass code to ScriptCompiler::CreateCodeCacheForFunction

This is unnecessary, deprecated, and removed in V8 7.0.

PR-URL: https://github.com/nodejs/node/pull/22596
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Michaël Zasso 2018-08-30 08:46:06 +02:00
parent 8e189794df
commit 98b5d66629
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600

View File

@ -1103,8 +1103,8 @@ void ContextifyContext::CompileFunction(
}
if (produce_cached_data) {
const std::unique_ptr<ScriptCompiler::CachedData>
cached_data(ScriptCompiler::CreateCodeCacheForFunction(fun, code));
const std::unique_ptr<ScriptCompiler::CachedData> cached_data(
ScriptCompiler::CreateCodeCacheForFunction(fun));
bool cached_data_produced = cached_data != nullptr;
if (cached_data_produced) {
MaybeLocal<Object> buf = Buffer::Copy(