Bug 835635: Cast ArrayLength() result to (signed) 'gint' type in #define for CUSTOM_VALUE_INDEX, since we compare it to gint values all over the place. r=karlt