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

Unified Diff: src/factory.cc

Issue 1014793003: Feedback vector: ASAN found memory leaks during AST Numbering pass. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Minor fixes. 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 | « src/factory.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index aa213fd99f6dd10412fb5845af42a10bf6ba9272..65e28a1df83835aa4baf4c5bc33418c472428185 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -2014,9 +2014,14 @@ void Factory::BecomeJSFunction(Handle<JSProxy> proxy) {
}
-Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(
- const FeedbackVectorSpec& spec) {
- return TypeFeedbackVector::Allocate(isolate(), spec);
+template Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(
+ const ZoneFeedbackVectorSpec* spec);
+template Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(
+ const FeedbackVectorSpec* spec);
+
+template <typename Spec>
+Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(const Spec* spec) {
+ return TypeFeedbackVector::Allocate<Spec>(isolate(), spec);
}
@@ -2084,9 +2089,9 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
share->set_script(*undefined_value(), SKIP_WRITE_BARRIER);
share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER);
share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER);
- FeedbackVectorSpec empty_spec;
+ FeedbackVectorSpec empty_spec(0);
Handle<TypeFeedbackVector> feedback_vector =
- NewTypeFeedbackVector(empty_spec);
+ NewTypeFeedbackVector(&empty_spec);
share->set_feedback_vector(*feedback_vector, SKIP_WRITE_BARRIER);
#if TRACE_MAPS
share->set_unique_id(isolate()->GetNextUniqueSharedFunctionInfoId());
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698