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(
// execution context is valid, it must have a responsible browsing context.
SECURITY_CHECK(resolver->GetFrame());
String error_message;
if (!resolver->GetExecutionContext()->IsSecureContext(error_message)) {
resolver->Reject(DOMException::Create(kSecurityError, error_message));
return false;
}
// The API is not exposed in non-secure context.
SECURITY_CHECK(resolver->GetExecutionContext()->IsSecureContext());
if (required_origin_type == RequiredOriginType::kSecureAndSameWithAncestors &&
!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