Revert of Store the next serial number in the function cache rather than in the isolate.Don't overwrite existi (patchset #4 id:60001 of https://codereview.chromium.org/988693003/)
Reason for revert: This doesn't do what it's supposed to do. The problem seems to lie on the blink side, people aren't reusing their FunctionTemplates (or creating them when not necessary). Original issue's description: > Don't overwrite existing serial numbers on the function template, otherwise instantiating the function for a new context causes the serial number to bump. > > Committed: https://crrev.com/1e638c3610ec6938e5fb16c42018642195782fb2 > Cr-Commit-Position: refs/heads/master@{#27048} TBR=yangguo@chromium.org,dcarney@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/993533003 Cr-Commit-Position: refs/heads/master@{#27067}
This commit is contained in:
parent
d7f25f557c
commit
a9a3623604
@ -943,7 +943,7 @@ static Local<FunctionTemplate> FunctionTemplateNew(
|
||||
InitializeFunctionTemplate(obj);
|
||||
obj->set_do_not_cache(do_not_cache);
|
||||
int next_serial_number = 0;
|
||||
if (!do_not_cache && !obj->serial_number()->IsSmi()) {
|
||||
if (!do_not_cache) {
|
||||
next_serial_number = isolate->next_serial_number() + 1;
|
||||
isolate->set_next_serial_number(next_serial_number);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user