8b68d343c7
avoid overflow. For each variable size heap object, compute the maximum number of elements and use that in the ::New functions to avoid overflow. If a bad length/size reaches a ::New function, that is a FATAL error -- the problem should have been caught earlier by the dart api or by the library code. Add "border guards" in the dart api and in library calls which cause new variable size heap objects to be allocated. We check for invalid length/size and throw explanatory error messages. Review URL: https://chromiumcodereview.appspot.com//10782016 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10130 260f80e4-7a28-3924-810f-c04153c831b5