Commit a9a36236 authored by verwaest's avatar verwaest Committed by Commit bot

Revert of Store the next serial number in the function cache rather than in...

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}
parent d7f25f55
...@@ -943,7 +943,7 @@ static Local<FunctionTemplate> FunctionTemplateNew( ...@@ -943,7 +943,7 @@ static Local<FunctionTemplate> FunctionTemplateNew(
InitializeFunctionTemplate(obj); InitializeFunctionTemplate(obj);
obj->set_do_not_cache(do_not_cache); obj->set_do_not_cache(do_not_cache);
int next_serial_number = 0; 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; next_serial_number = isolate->next_serial_number() + 1;
isolate->set_next_serial_number(next_serial_number); isolate->set_next_serial_number(next_serial_number);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment