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

Unified Diff: chrome/renderer/resources/json_schema.js

Issue 7787004: Fix crash when calling chrome.tabs.move({index:-1}). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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 | chrome/test/data/extensions/api_test/tabs/basics/move.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/json_schema.js
diff --git a/chrome/renderer/resources/json_schema.js b/chrome/renderer/resources/json_schema.js
index 8f588b2f45b445aa37138410a8bb5f5e3d1f6efd..ad47748ae0c5bd90f3becc5baefb23e8e9946df5 100644
--- a/chrome/renderer/resources/json_schema.js
+++ b/chrome/renderer/resources/json_schema.js
@@ -405,10 +405,10 @@ chromeHidden.JSONSchemaValidator.prototype.validateNumber = function(
instance == Number.NEGATIVE_INFINITY )
this.addError(path, "numberFiniteNotNan", [instance]);
- if (schema.minimum && instance < schema.minimum)
+ if (schema.minimum !== undefined && instance < schema.minimum)
this.addError(path, "numberMinValue", [schema.minimum]);
- if (schema.maximum && instance > schema.maximum)
+ if (schema.maximum !== undefined && instance > schema.maximum)
this.addError(path, "numberMaxValue", [schema.maximum]);
// Check for integer values outside of -2^31..2^31-1.
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/tabs/basics/move.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698