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

Unified Diff: src/frames.h

Issue 3135022: Give correct value ranges to enumeration types used as opaque types. (Closed)
Patch Set: fixed Created 10 years, 4 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 | « SConstruct ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.h
diff --git a/src/frames.h b/src/frames.h
index 102244c9ba2f81879b823b69ebfe4fd6c46fa324..ef3011a8ffd0e8e76ecbefe5f89fc07083fca8c6 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -112,7 +112,13 @@ class StackFrame BASE_EMBEDDED {
// Opaque data type for identifying stack frames. Used extensively
// by the debugger.
- enum Id { NO_ID = 0 };
+ // ID_MIN_VALUE and ID_MAX_VALUE are specified to ensure that enumeration type
+ // has correct value range (see Issue 830 for more details).
+ enum Id {
+ ID_MIN_VALUE = kMinInt,
+ ID_MAX_VALUE = kMaxInt,
+ NO_ID = 0
+ };
// Copy constructor; it breaks the connection to host iterator.
StackFrame(const StackFrame& original) {
« no previous file with comments | « SConstruct ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698