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

Unified Diff: include/v8.h

Issue 16409011: build fix for build fix for 14990 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index e35cc7a99852a8c6fdb1d231e05118192f75a8ec..519330aa2124b68961404f0b0119dba02891e18a 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -38,7 +38,6 @@
#ifndef V8_H_
#define V8_H_
-#include <limits.h>
#include "v8stdint.h"
#ifdef _WIN32
@@ -5683,7 +5682,9 @@ void ReturnValue<T>::Set(int32_t i) {
template<typename T>
void ReturnValue<T>::Set(uint32_t i) {
typedef internal::Internals I;
- if (V8_LIKELY(i <= INT32_MAX)) {
+ // Can't simply use INT32_MAX here for whatever reason.
+ bool fits_into_int32_t = (i & (1 << 31)) == 0;
+ if (V8_LIKELY(fits_into_int32_t)) {
Set(static_cast<int32_t>(i));
return;
}
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698