зеркало из https://github.com/mozilla/gecko-dev.git
Bug 140324 NS_ENSURE_TRUE(NS_SUCCEEDED(),) used needlessy in some places
patch by Morten@Nilsen.com r=hwaara sr=alecf
This commit is contained in:
Родитель
a147d3d37e
Коммит
b49d33e07d
|
@ -3588,10 +3588,10 @@ HTMLContentSink::DidProcessAToken(void)
|
|||
// If we can't get the last input time from the widget
|
||||
// then we will get it from the viewmanager.
|
||||
rv = vm->GetLastUserEventTime(eventTime);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(rv , NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
|
||||
|
||||
if ((!(mFlags & NS_SINK_FLAG_DYNAMIC_LOWER_VALUE)) &&
|
||||
(mLastSampledUserEventTime == eventTime)) {
|
||||
|
|
|
@ -888,11 +888,11 @@ PRBool SameOrSubdomainOfTarget(nsIURI* aOriginURI, nsIURI* aTargetURI, PRBool aD
|
|||
{
|
||||
nsCAutoString targetScheme;
|
||||
nsresult rv = aTargetURI->GetScheme(targetScheme);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, PR_TRUE);
|
||||
|
||||
nsCAutoString originScheme;
|
||||
rv = aOriginURI->GetScheme(originScheme);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, PR_TRUE);
|
||||
|
||||
if (strcmp(targetScheme.get(), originScheme.get()))
|
||||
return PR_FALSE; // Different schemes - check fails
|
||||
|
@ -908,11 +908,11 @@ PRBool SameOrSubdomainOfTarget(nsIURI* aOriginURI, nsIURI* aTargetURI, PRBool aD
|
|||
// Each message is a distinct trust domain; use the whole spec for comparison
|
||||
nsCAutoString targetSpec;
|
||||
rv =aTargetURI->GetAsciiSpec(targetSpec);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, PR_TRUE);
|
||||
|
||||
nsCAutoString originSpec;
|
||||
rv = aOriginURI->GetAsciiSpec(originSpec);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, PR_TRUE);
|
||||
|
||||
return (! strcmp(targetSpec.get(), originSpec.get())); // True if full spec is same, false otherwise
|
||||
}
|
||||
|
@ -920,10 +920,10 @@ PRBool SameOrSubdomainOfTarget(nsIURI* aOriginURI, nsIURI* aTargetURI, PRBool aD
|
|||
// Compare ports.
|
||||
int targetPort, originPort;
|
||||
rv = aTargetURI->GetPort(&targetPort);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, PR_TRUE);
|
||||
|
||||
rv = aOriginURI->GetPort(&originPort);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, PR_TRUE);
|
||||
|
||||
if (targetPort != originPort)
|
||||
return PR_FALSE; // Different port - check fails
|
||||
|
@ -931,11 +931,11 @@ PRBool SameOrSubdomainOfTarget(nsIURI* aOriginURI, nsIURI* aTargetURI, PRBool aD
|
|||
// Need to check the hosts
|
||||
nsCAutoString targetHost;
|
||||
rv = aTargetURI->GetHost(targetHost);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, PR_TRUE);
|
||||
|
||||
nsCAutoString originHost;
|
||||
rv = aOriginURI->GetHost(originHost);
|
||||
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, PR_TRUE);
|
||||
|
||||
if (!strcmp(targetHost.get(), originHost.get()))
|
||||
return PR_TRUE; // Hosts are the same - check passed
|
||||
|
|
Загрузка…
Ссылка в новой задаче