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

Issue 5018002: Fixes a crash when entering a negative index with chrome.tabs.move .... (Closed)

Created:
10 years, 1 month ago by cheesedanish
Modified:
8 years, 9 months ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews, Erik does not do reviews, brettw-cc_chromium.org, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org
Visibility:
Public.

Description

Fixes a bug where the json_schema.js would ignore 'minimum' and 'maximum' when the value of either was 0. Also getType() was returning "integer" for values outside the range of an integer. getType() now returns "number" for large values. Unit tests are also added to spot these problems. Follow up to ISSUE=5029001 BUG=53990

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -6 lines) Patch
M chrome/renderer/resources/json_schema.js View 1 2 4 chunks +6 lines, -6 lines 1 comment Download
M chrome/test/data/extensions/api_test/tabs/basics/move.html View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/json_schema_test.js View 1 2 3 4 5 6 2 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Aaron Boodman
Great, almost there. For future reference, you don't need to create a new issue on ...
10 years, 1 month ago (2010-11-16 20:21:28 UTC) #1
cheesedanish
10 years, 1 month ago (2010-11-18 18:54:18 UTC) #2
Aaron Boodman
LGTM w/ the below exception. Don't worry about a new patch. I will do this ...
10 years, 1 month ago (2010-11-18 23:04:35 UTC) #3
cheesedanish
10 years, 1 month ago (2010-11-19 03:51:01 UTC) #4
A posible correction to his statement.  The C code expects an integer to be an
int32.  Make sure it works with values greater than 2^31.
-W
------Original Message------
From: aa@chromium.org
To: waltermil@gmail.com
Cc: chromium-reviews@chromium.org
Cc: erikkay@chromium.org
Cc: brettw-cc@chromium.org
Cc: pam+watch@chromium.org
Cc: phajdan.jr@chromium.org
Cc: darin-cc@chromium.org
ReplyTo: waltermil@gmail.com
ReplyTo: aa@chromium.org
ReplyTo: chromium-reviews@chromium.org
ReplyTo: erikkay@chromium.org
ReplyTo: brettw-cc@chromium.org
ReplyTo: pam+watch@chromium.org
ReplyTo: phajdan.jr@chromium.org
ReplyTo: darin-cc@chromium.org
Subject: Re: Fixes a crash when entering a negative index withchrome.tabs.move
.... (issue5018002)
Sent: Nov 18, 2010 6:04 PM

LGTM w/ the below exception.

Don't worry about a new patch. I will do this when I land it.

Thanks for the contribution!


http://codereview.chromium.org/5018002/diff/26001/chrome/renderer/resources/j...
File chrome/renderer/resources/json_schema.js (right):

http://codereview.chromium.org/5018002/diff/26001/chrome/renderer/resources/j...
chrome/renderer/resources/json_schema.js:108: var maxInt = -1 >>> 1;
This is not the largest representable integer in JavaScript. That honor
goes to Math.pow(2, 53). For background on why this is, see:
http://en.wikipedia.org/wiki/Double_precision

http://codereview.chromium.org/5018002/


Sent from my “contract free” BlackBerry® smartphone on the WIND network.

Powered by Google App Engine
This is Rietveld 408576698