commit | de1819e35f05acf0acbbaace42c2e54797383ad7 | [log] [tgz] |
---|---|---|
author | Narayan Kamath <narayan@google.com> | Mon Apr 24 13:55:51 2017 +0100 |
committer | Narayan Kamath <narayan@google.com> | Tue Apr 25 11:33:32 2017 +0100 |
tree | d86e1df3e70eeed841b8436ea9bff5d2fa82fb2e | |
parent | 37030d1489bc3a76c835617a8a8059e0b47dea71 [diff] |
CharsetEncoderICU: Don't call updateCallback from <init>. Changed for correctness and for consistency with CharsetDecoderICU. The existing code is incorrect because we'd end up deleting the same allocation twice (once from NativeAllocationRegistry's reference queue, and once from the finally block) if updateCallback throws. Related to b/37315864. Test: run cts -m CtsLibcoreTestCases Change-Id: I5425093ed7fbdc4aa69f5b9108428399b3c8c555