| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index ad7cb1132be820ad1e54480636220d97401532d4..94e8b30b071aeec794c99fcb8497b06902f50f6d 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -6375,21 +6375,11 @@ void Document::platformColorsChanged() {
|
| bool Document::isSecureContext(
|
| String& errorMessage,
|
| const SecureContextCheck privilegeContextCheck) const {
|
| - bool isSecure = isSecureContextImpl(privilegeContextCheck);
|
| - if (getSandboxFlags() != SandboxNone) {
|
| - UseCounter::count(
|
| - *this, isSecure
|
| - ? UseCounter::SecureContextCheckForSandboxedOriginPassed
|
| - : UseCounter::SecureContextCheckForSandboxedOriginFailed);
|
| + if (!isSecureContext(privilegeContextCheck)) {
|
| + errorMessage = SecurityOrigin::isPotentiallyTrustworthyErrorMessage();
|
| + return false;
|
| }
|
| - UseCounter::count(*this, isSecure ? UseCounter::SecureContextCheckPassed
|
| - : UseCounter::SecureContextCheckFailed);
|
| -
|
| - if (isSecure)
|
| - return true;
|
| -
|
| - errorMessage = SecurityOrigin::isPotentiallyTrustworthyErrorMessage();
|
| - return false;
|
| + return true;
|
| }
|
|
|
| bool Document::isSecureContext(
|
|
|