• Elliott Hughes's avatar
    Don't allocate arbitrary-length buffers on the stack. · 845ce3cb
    Elliott Hughes authored
    A new LocalArray C++ class lets us specify a "reasonable" amount of stack to
    use, but transparently fall back to using the heap if we need more space.
    
    The three places I've chosen to use LocalArray in this patch are fairly
    random; all they have in common is that they're the places where we call
    GetStringUTFRegion. There are more places LocalArray will be useful: the
    java.io.File JNI in particular.
    
    Bug: 2257819
    845ce3cb
NativeCode.mk 3.95 KB