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

Side by Side Diff: chrome/browser/android/java_exception_reporter.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/java_exception_reporter.h" 5 #include "chrome/browser/android/java_exception_reporter.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/debug/dump_without_crashing.h" 9 #include "base/debug/dump_without_crashing.h"
10 #include "jni/JavaExceptionReporter_jni.h" 10 #include "jni/JavaExceptionReporter_jni.h"
11 11
12 namespace chrome { 12 namespace chrome {
13 namespace android { 13 namespace android {
14 14
15 void InitJavaExceptionReporter() { 15 void InitJavaExceptionReporter() {
16 JNIEnv* env = base::android::AttachCurrentThread(); 16 JNIEnv* env = base::android::AttachCurrentThread();
17 Java_JavaExceptionReporter_installHandler(env); 17 Java_JavaExceptionReporter_installHandler(env);
18 } 18 }
19 19
20 void ReportJavaException(JNIEnv* env, jclass jcaller, jthrowable e) { 20 void ReportJavaException(JNIEnv* env,
21 const JavaParamRef<jclass>& jcaller,
22 const JavaParamRef<jthrowable>& e) {
21 // Set the exception_string in BuildInfo so that breakpad can read it. 23 // Set the exception_string in BuildInfo so that breakpad can read it.
22 base::android::BuildInfo::GetInstance()->SetJavaExceptionInfo( 24 base::android::BuildInfo::GetInstance()->SetJavaExceptionInfo(
23 base::android::GetJavaExceptionInfo(env, e)); 25 base::android::GetJavaExceptionInfo(env, e));
24 base::debug::DumpWithoutCrashing(); 26 base::debug::DumpWithoutCrashing();
25 base::android::BuildInfo::GetInstance()->ClearJavaExceptionInfo(); 27 base::android::BuildInfo::GetInstance()->ClearJavaExceptionInfo();
26 } 28 }
27 29
28 bool RegisterJavaExceptionReporterJni(JNIEnv* env) { 30 bool RegisterJavaExceptionReporterJni(JNIEnv* env) {
29 return RegisterNativesImpl(env); 31 return RegisterNativesImpl(env);
30 } 32 }
31 33
32 34
33 } // namespace android 35 } // namespace android
34 } // namespace chrome 36 } // namespace chrome
35 37
36 38
OLDNEW
« no previous file with comments | « chrome/browser/android/history_report/history_report_jni_bridge.cc ('k') | chrome/browser/android/large_icon_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698