Commit e1756825 authored by Jinho Bang's avatar Jinho Bang Committed by Commit Bot

Credentials: Remove unnecessary IsSecureContext() check

The CredentialsContainer already declares [SecureContext] extended
attribute at the WebIDL. It makes the interface members exposed to only
secure context in binding level. Therefore, the manual check is
unnecesary because it is always true.

Bug: none
Change-Id: I58afb18a5be83d77d27ff513ef05f2cdaa1bf91a
Reviewed-on: https://chromium-review.googlesource.com/989644Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#548027}
parent 178439bc
...@@ -117,11 +117,8 @@ bool CheckSecurityRequirementsBeforeRequest( ...@@ -117,11 +117,8 @@ bool CheckSecurityRequirementsBeforeRequest(
// execution context is valid, it must have a responsible browsing context. // execution context is valid, it must have a responsible browsing context.
SECURITY_CHECK(resolver->GetFrame()); SECURITY_CHECK(resolver->GetFrame());
String error_message; // The API is not exposed in non-secure context.
if (!resolver->GetExecutionContext()->IsSecureContext(error_message)) { SECURITY_CHECK(resolver->GetExecutionContext()->IsSecureContext());
resolver->Reject(DOMException::Create(kSecurityError, error_message));
return false;
}
if (required_origin_type == RequiredOriginType::kSecureAndSameWithAncestors && if (required_origin_type == RequiredOriginType::kSecureAndSameWithAncestors &&
!IsSameOriginWithAncestors(resolver->GetFrame())) { !IsSameOriginWithAncestors(resolver->GetFrame())) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment