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

Side by Side Diff: runtime/vm/isolate_reload.cc

Issue 2164703003: Fix for use-after-free of reload context (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: s/test_mode/dont_delete_reload_context/, simplifications Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/isolate_reload.h ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/isolate_reload.h" 5 #include "vm/isolate_reload.h"
6 6
7 #include "vm/become.h" 7 #include "vm/become.h"
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 bool IsolateReloadContext::IsSameLibrary( 170 bool IsolateReloadContext::IsSameLibrary(
171 const Library& a_lib, const Library& b_lib) { 171 const Library& a_lib, const Library& b_lib) {
172 const String& a_lib_url = 172 const String& a_lib_url =
173 String::Handle(a_lib.IsNull() ? String::null() : a_lib.url()); 173 String::Handle(a_lib.IsNull() ? String::null() : a_lib.url());
174 const String& b_lib_url = 174 const String& b_lib_url =
175 String::Handle(b_lib.IsNull() ? String::null() : b_lib.url()); 175 String::Handle(b_lib.IsNull() ? String::null() : b_lib.url());
176 return a_lib_url.Equals(b_lib_url); 176 return a_lib_url.Equals(b_lib_url);
177 } 177 }
178 178
179 179
180 IsolateReloadContext::IsolateReloadContext(Isolate* isolate, bool test_mode) 180 IsolateReloadContext::IsolateReloadContext(Isolate* isolate)
181 : start_time_micros_(OS::GetCurrentMonotonicMicros()), 181 : start_time_micros_(OS::GetCurrentMonotonicMicros()),
182 isolate_(isolate), 182 isolate_(isolate),
183 test_mode_(test_mode),
184 has_error_(false), 183 has_error_(false),
185 saved_num_cids_(-1), 184 saved_num_cids_(-1),
186 saved_class_table_(NULL), 185 saved_class_table_(NULL),
187 num_saved_libs_(-1), 186 num_saved_libs_(-1),
188 script_uri_(String::null()), 187 script_uri_(String::null()),
189 error_(Error::null()), 188 error_(Error::null()),
190 old_classes_set_storage_(Array::null()), 189 old_classes_set_storage_(Array::null()),
191 class_map_storage_(Array::null()), 190 class_map_storage_(Array::null()),
192 old_libraries_set_storage_(Array::null()), 191 old_libraries_set_storage_(Array::null()),
193 library_map_storage_(Array::null()), 192 library_map_storage_(Array::null()),
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 ASSERT(!super_cls.IsNull()); 1131 ASSERT(!super_cls.IsNull());
1133 super_cls.AddDirectSubclass(cls); 1132 super_cls.AddDirectSubclass(cls);
1134 } 1133 }
1135 } 1134 }
1136 } 1135 }
1137 } 1136 }
1138 1137
1139 #endif // !PRODUCT 1138 #endif // !PRODUCT
1140 1139
1141 } // namespace dart 1140 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate_reload.h ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698