Chromium Code Reviews| Index: chrome/browser/ui/android/infobars/translate_infobar.cc |
| diff --git a/chrome/browser/ui/android/infobars/translate_infobar.cc b/chrome/browser/ui/android/infobars/translate_infobar.cc |
| index d287757448286d8d325ffb7e8be2adb3d2285b03..f4cdf4411cde2c7d97b8f6370b3e99aa022bbf1c 100644 |
| --- a/chrome/browser/ui/android/infobars/translate_infobar.cc |
| +++ b/chrome/browser/ui/android/infobars/translate_infobar.cc |
| @@ -104,9 +104,11 @@ void TranslateInfoBar::ApplyTranslateOptions(JNIEnv* env, |
| void TranslateInfoBar::TransferOwnership(TranslateInfoBar* destination, |
| translate::TranslateStep new_type) { |
| JNIEnv* env = base::android::AttachCurrentThread(); |
| - if (Java_TranslateInfoBarDelegate_changeTranslateInfoBarTypeAndPointer( |
| - env, java_translate_delegate_.obj(), |
| - reinterpret_cast<intptr_t>(destination), new_type)) { |
| + if (destination != nullptr && |
|
David Trainor- moved to gerrit
2015/06/02 17:51:55
If destination is null, should we just drop owners
Changwan Ryu
2015/06/03 04:55:41
Removed the check as it cannot be null.
|
| + Java_TranslateInfoBarDelegate_changeTranslateInfoBarTypeAndPointer( |
| + env, java_translate_delegate_.obj(), |
| + reinterpret_cast<intptr_t>(destination->infobar_android()), |
| + reinterpret_cast<intptr_t>(destination), new_type)) { |
| ReassignJavaInfoBar(destination); |
| destination->SetJavaDelegate(java_translate_delegate_.Release()); |
| } |