mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1632594 - Use Long.valueOf instead of Integer.valueOf on GeckoSession#onExternalResponse. r=geckoview-reviewers,agi
When content length is over 2GB, `WebResponseInfo.contentLength` is negative value. Use Long.valueOf instead of Integer.valueOf to pass this value. Differential Revision: https://phabricator.services.mozilla.com/D74586
This commit is contained in:
parent
50334d3714
commit
ec78483903
@ -104,7 +104,7 @@ NS_IMETHODIMP GeckoViewExternalAppService::CreateListener(
|
||||
}
|
||||
|
||||
keys.AppendElement(jni::StringParam(NS_LITERAL_STRING("contentLength")));
|
||||
values.AppendElement(java::sdk::Integer::ValueOf(contentLength));
|
||||
values.AppendElement(java::sdk::Long::ValueOf(contentLength));
|
||||
|
||||
nsString filename;
|
||||
if (NS_SUCCEEDED(channel->GetContentDispositionFilename(filename))) {
|
||||
@ -132,4 +132,4 @@ NS_IMETHODIMP GeckoViewExternalAppService::ApplyDecodingForExtension(
|
||||
// This currently doesn't matter, because we never read the stream.
|
||||
*aApplyDecoding = true;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,9 @@ booleanValue =
|
||||
# because some Integer values are cached.
|
||||
valueOf(I)Ljava/lang/Integer; =
|
||||
|
||||
[java.lang.Long = skip:true]
|
||||
valueOf(J)Ljava/lang/Long; =
|
||||
|
||||
[java.lang.Number = skip:true]
|
||||
# Use doubleValue() for unboxing Double/Float/Long.
|
||||
doubleValue =
|
||||
|
Loading…
Reference in New Issue
Block a user