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

Unified Diff: runtime/vm/growable_array.h

Issue 2641243002: Removed usage of std::map and std::vector from kernel code. Issue #28064. (Closed)
Patch Set: Created 3 years, 11 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 | runtime/vm/kernel_binary.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/growable_array.h
diff --git a/runtime/vm/growable_array.h b/runtime/vm/growable_array.h
index b2d03e08bf4fedf2d2cc5733a4743f0a89f45c48..442b2550622a56be685538841c1e3569e1d1eea0 100644
--- a/runtime/vm/growable_array.h
+++ b/runtime/vm/growable_array.h
@@ -38,7 +38,8 @@ class BaseGrowableArray : public B {
bool is_empty() const { return length_ == 0; }
void TruncateTo(intptr_t length) {
- ASSERT(length_ >= length);
+ ASSERT(length >= 0);
+ ASSERT(static_cast<uintptr_t>(length_) >= static_cast<uintptr_t>(length));
bkonyi 2017/01/19 20:48:46 The compiler was complaining that doing length_ >=
zra 2017/01/19 21:06:25 I think it's not worried about overflow here, but
bkonyi 2017/01/20 23:56:28 See comment in new patch in kernel_binary.
length_ = length;
}
« no previous file with comments | « no previous file | runtime/vm/kernel_binary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698