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

Unified Diff: src/arguments.h

Issue 1384873002: Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix unintialized variable Created 5 years, 2 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 | « include/v8config.h ('k') | src/base/logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arguments.h
diff --git a/src/arguments.h b/src/arguments.h
index 63a3706fd8731264c2e779a768dc5fc9645a3ee3..d11a8cd61ee0b18659e2e66164f3c5de20675411 100644
--- a/src/arguments.h
+++ b/src/arguments.h
@@ -29,10 +29,13 @@ namespace internal {
class Arguments BASE_EMBEDDED {
public:
Arguments(int length, Object** arguments)
- : length_(length), arguments_(arguments) { }
+ : length_(length), arguments_(arguments) {
+ DCHECK_GE(length_, 0);
+ }
Object*& operator[] (int index) {
- DCHECK(0 <= index && index < length_);
+ DCHECK_GE(index, 0);
+ DCHECK_LT(static_cast<uint32_t>(index), static_cast<uint32_t>(length_));
return *(reinterpret_cast<Object**>(reinterpret_cast<intptr_t>(arguments_) -
index * kPointerSize));
}
« no previous file with comments | « include/v8config.h ('k') | src/base/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698