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

Issue 1913183002: Allow null jstring to C++ string conversions in release. (Closed)

Created:
4 years, 8 months ago by Torne
Modified:
4 years, 8 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow null jstring to C++ string conversions in release. WebView has too many cases where apps can pass in a null java string and have it reach native causing a crash. For now, put back the code that returned empty string, but keep the DCHECK so that we still hit it on bots that run with DCHECKs enabled. We'll fix WebView and have another go at this in a later release. This is a partial revert of https://codereview.chromium.org/1828193002 BUG=597564 Committed: https://crrev.com/075418c032dd093e52aef9e56b8a3eb55eb7dc58 Cr-Commit-Position: refs/heads/master@{#389166}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -0 lines) Patch
M base/android/jni_string.cc View 2 chunks +10 lines, -0 lines 1 comment Download

Messages

Total messages: 14 (6 generated)
Torne
Toby, can you take a quick look? (I'm a base/android OWNER already ;)
4 years, 8 months ago (2016-04-22 17:05:47 UTC) #3
Tobias Sargeant
On 2016/04/22 17:05:47, Torne wrote: > Toby, can you take a quick look? (I'm a ...
4 years, 8 months ago (2016-04-22 17:08:15 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1913183002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1913183002/1
4 years, 8 months ago (2016-04-22 17:09:17 UTC) #6
Torne
Adding bauerb@ as an FYI, sorry to partially undo your change without asking but this ...
4 years, 8 months ago (2016-04-22 17:11:15 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-22 18:13:45 UTC) #10
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/075418c032dd093e52aef9e56b8a3eb55eb7dc58 Cr-Commit-Position: refs/heads/master@{#389166}
4 years, 8 months ago (2016-04-22 19:49:50 UTC) #12
Bernhard Bauer
Yeah, makes sense I guess. https://codereview.chromium.org/1913183002/diff/1/base/android/jni_string.cc File base/android/jni_string.cc (right): https://codereview.chromium.org/1913183002/diff/1/base/android/jni_string.cc#newcode29 base/android/jni_string.cc:29: LOG(WARNING) << "ConvertJavaStringToUTF8 called ...
4 years, 8 months ago (2016-04-22 20:29:17 UTC) #13
Torne
4 years, 8 months ago (2016-04-25 10:05:44 UTC) #14
Message was sent while issue was closed.
On 2016/04/22 20:29:17, Bernhard Bauer wrote:
> Yeah, makes sense I guess.
> 
> https://codereview.chromium.org/1913183002/diff/1/base/android/jni_string.cc
> File base/android/jni_string.cc (right):
> 
>
https://codereview.chromium.org/1913183002/diff/1/base/android/jni_string.cc#...
> base/android/jni_string.cc:29: LOG(WARNING) << "ConvertJavaStringToUTF8 called
> with null string.";
> FWIW, I probably would have done this with a NOTREACHED(), or a LOG(DFATAL).

I just restored the old code for the release case and didn't worry too much
about exactly what it did. Hopefully we can get rid of this again fairly soon,
just not in M51. :)

Powered by Google App Engine
This is Rietveld 408576698