Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: third_party/WebKit/Source/core/frame/DOMWindow.cpp

Issue 1504403003: Calling isSecureContext() with no arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored isSecureContext() Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/frame/DOMWindow.h" 6 #include "core/frame/DOMWindow.h"
7 7
8 #include "bindings/core/v8/ScriptCallStackFactory.h" 8 #include "bindings/core/v8/ScriptCallStackFactory.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 m_location->reset(); 156 m_location->reset();
157 m_location = nullptr; 157 m_location = nullptr;
158 } 158 }
159 } 159 }
160 160
161 bool DOMWindow::isSecureContext() const 161 bool DOMWindow::isSecureContext() const
162 { 162 {
163 if (!frame()) 163 if (!frame())
164 return false; 164 return false;
165 165
166 String unusedErrorMessage; 166 return document()->ExecutionContext::isSecureContext(ExecutionContext::Stand ardSecureContextCheck);
estark 2015/12/18 00:00:58 same here
167 return document()->isSecureContext(unusedErrorMessage, ExecutionContext::Sta ndardSecureContextCheck);
168 } 167 }
169 168
170 void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const Mes sagePortArray* ports, const String& targetOrigin, LocalDOMWindow* source, Except ionState& exceptionState) 169 void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const Mes sagePortArray* ports, const String& targetOrigin, LocalDOMWindow* source, Except ionState& exceptionState)
171 { 170 {
172 if (!isCurrentlyDisplayedInFrame()) 171 if (!isCurrentlyDisplayedInFrame())
173 return; 172 return;
174 173
175 Document* sourceDocument = source->document(); 174 Document* sourceDocument = source->document();
176 175
177 // Compute the target origin. We need to do this synchronously in order 176 // Compute the target origin. We need to do this synchronously in order
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 m_windowIsClosing = true; 340 m_windowIsClosing = true;
342 } 341 }
343 342
344 DEFINE_TRACE(DOMWindow) 343 DEFINE_TRACE(DOMWindow)
345 { 344 {
346 visitor->trace(m_location); 345 visitor->trace(m_location);
347 EventTargetWithInlineData::trace(visitor); 346 EventTargetWithInlineData::trace(visitor);
348 } 347 }
349 348
350 } // namespace blink 349 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698