New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 610353 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocking:
issue 516342



Sign in to add a comment

CronetBidirectionalStreamAdapter leak array

Project Member Reported by xunji...@chromium.org, May 9 2016

Issue description

We allocate a JNI array in CronetBidirectionalStreamAdapter::OnDataSent, but we didn't delete it. We should wrap |jbuffers| with ScopedJavaLocalRef to perform cleanup tasks.

jobjectArray jbuffers =
      env->NewObjectArray(size, byte_buffer_clazz.obj(), NULL);

 
Components: Internals>Network>Library
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, May 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c524bde480633344575ff0a2b0b8a7489ee07156

commit c524bde480633344575ff0a2b0b8a7489ee07156
Author: xunjieli <xunjieli@chromium.org>
Date: Mon May 09 23:05:27 2016

Fix leak in CronetBidirectionalStreamAdapter::OnDataSent

This CL wraps the newly created jobjectArray with ScopedJavaLocalRef so that
the object is deleted when call returns.

BUG= 610353 

Review-Url: https://codereview.chromium.org/1960243002
Cr-Commit-Position: refs/heads/master@{#392463}

[modify] https://crrev.com/c524bde480633344575ff0a2b0b8a7489ee07156/components/cronet/android/cronet_bidirectional_stream_adapter.cc
[modify] https://crrev.com/c524bde480633344575ff0a2b0b8a7489ee07156/components/cronet/android/cronet_bidirectional_stream_adapter.h

Status: Fixed (was: Started)
Blocking: 516342

Sign in to add a comment