Review URL: http://codereview.chromium.org/17639
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1057
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
var cache = kApiFunctionCache;
var serialNumber = %GetTemplateField(data, kApiSerialNumberOffset);
var isFunctionCached =
- (serialNumber in cache) &&
- (cache[serialNumber] != -1);
+ (serialNumber in cache) && (cache[serialNumber] != kUninitialized);
if (!isFunctionCached) {
try {
cache[serialNumber] = null;
}
ConfigureTemplateInstance(fun, data);
} catch (e) {
- cache[serialNumber] = -1;
+ cache[serialNumber] = kUninitialized;
throw e;
}
}
const msPerHour = 3600000;
const msPerDay = 86400000;
+# For apinatives.js
+const kUninitialized = -1;
+
# Note: kDayZeroInJulianDay = ToJulianDay(1970, 0, 1).
const kInvalidDate = 'Invalid Date';
const kDayZeroInJulianDay = 2440588;