Cache locally function templates returned by gin::CreateFunctionTemplate
V8 caches FunctionTemplates for a lifetime of a web page for its own internal reasons, thus it is generally a good idea to cache the template returned by gin::CreateFunctionTemplate function. Otherwise, repeated method invocations from JS will create substantial memory leaks. BUG=463487 Review URL: https://codereview.chromium.org/974183005 Cr-Commit-Position: refs/heads/master@{#321330}
Showing
Please register or sign in to comment