Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: src/api.cc

Issue 988693003: Store the next serial number in the function cache rather than in the isolate.Don't overwrite existi (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 7de0d12ad0c2987cd7aafdb1e698c40842e56c57..0e1e4bd3ed750d4b65dd1f0e27ef311e13eaa629 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -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) {
+ if (!do_not_cache && !obj->serial_number()->IsSmi()) {
next_serial_number = isolate->next_serial_number() + 1;
isolate->set_next_serial_number(next_serial_number);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698