Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Issue 225283008: base: Add ScopedJavaLocalFrame class. (Closed)

Created:
6 years, 8 months ago by reveman
Modified:
6 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, erikwright+watch_chromium.org, jam
Visibility:
Public.

Description

base: Add ScopedJavaLocalFrame class. This class can be used to create a local reference frame. A local reference frame ensures that some amount of local references can be created and forces all references created in the frame to be releases when exiting the frame. BUG=360069 TBR=darin Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262273

Patch Set 1 #

Total comments: 5

Patch Set 2 : address review feedback and make sure we cover all cases where ANativeWindow_fromSurface is used #

Patch Set 3 : add missing BASE_EXPORT #

Total comments: 4

Patch Set 4 : move ScopedJavaLocalFrame to top of file #

Patch Set 5 : Set kDefaultLocalFrameCapacity to 16. 512 is much higher than necessary and might fail. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -4 lines) Patch
M base/android/scoped_java_ref.h View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M base/android/scoped_java_ref.cc View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
M content/app/android/child_process_service.cc View 1 2 chunks +10 lines, -2 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 1 chunk +6 lines, -1 line 0 comments Download
M mojo/services/native_viewport/native_viewport_android.cc View 1 1 chunk +7 lines, -1 line 0 comments Download
M ui/gl/android/surface_texture.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
reveman
https://codereview.chromium.org/225283008/diff/1/content/app/android/child_process_service.cc File content/app/android/child_process_service.cc (right): https://codereview.chromium.org/225283008/diff/1/content/app/android/child_process_service.cc#newcode99 content/app/android/child_process_service.cc:99: base::android::ScopedJavaLocalFrame scoped_local_reference_frame(env); We might want to land this separately ...
6 years, 8 months ago (2014-04-04 16:18:31 UTC) #1
no sievers
LGTM w/nits https://codereview.chromium.org/225283008/diff/1/base/android/scoped_java_ref.cc File base/android/scoped_java_ref.cc (right): https://codereview.chromium.org/225283008/diff/1/base/android/scoped_java_ref.cc#newcode83 base/android/scoped_java_ref.cc:83: env_->PushLocalFrame(capacity); Might want to DCHECK() that this ...
6 years, 8 months ago (2014-04-04 20:32:11 UTC) #2
reveman
https://codereview.chromium.org/225283008/diff/1/base/android/scoped_java_ref.cc File base/android/scoped_java_ref.cc (right): https://codereview.chromium.org/225283008/diff/1/base/android/scoped_java_ref.cc#newcode83 base/android/scoped_java_ref.cc:83: env_->PushLocalFrame(capacity); On 2014/04/04 20:32:11, sievers wrote: > Might want ...
6 years, 8 months ago (2014-04-04 21:07:07 UTC) #3
reveman
+bulach for base/android +darin for mojo
6 years, 8 months ago (2014-04-04 21:12:44 UTC) #4
bulach
lgtm % nits, thanks! https://codereview.chromium.org/225283008/diff/40001/base/android/scoped_java_ref.cc File base/android/scoped_java_ref.cc (right): https://codereview.chromium.org/225283008/diff/40001/base/android/scoped_java_ref.cc#newcode77 base/android/scoped_java_ref.cc:77: ScopedJavaLocalFrame::ScopedJavaLocalFrame(JNIEnv* env) : env_(env) { ...
6 years, 8 months ago (2014-04-07 15:51:29 UTC) #5
reveman
https://codereview.chromium.org/225283008/diff/40001/base/android/scoped_java_ref.cc File base/android/scoped_java_ref.cc (right): https://codereview.chromium.org/225283008/diff/40001/base/android/scoped_java_ref.cc#newcode77 base/android/scoped_java_ref.cc:77: ScopedJavaLocalFrame::ScopedJavaLocalFrame(JNIEnv* env) : env_(env) { On 2014/04/07 15:51:29, bulach_ooo_14apr ...
6 years, 8 months ago (2014-04-07 17:38:29 UTC) #6
reveman
The CQ bit was checked by reveman@chromium.org
6 years, 8 months ago (2014-04-07 17:39:20 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/225283008/60001
6 years, 8 months ago (2014-04-07 17:39:58 UTC) #8
reveman
The CQ bit was checked by reveman@chromium.org
6 years, 8 months ago (2014-04-07 21:49:56 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/225283008/80001
6 years, 8 months ago (2014-04-07 21:50:57 UTC) #10
commit-bot: I haz the power
6 years, 8 months ago (2014-04-08 01:01:54 UTC) #11
Message was sent while issue was closed.
Change committed as 262273

Powered by Google App Engine
This is Rietveld 408576698