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

Unified Diff: third_party/WebKit/Source/core/frame/Location.cpp

Issue 2553383002: Mechanical style fixes: History.cpp and Location.cpp (Closed)
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/History.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/Location.cpp
diff --git a/third_party/WebKit/Source/core/frame/Location.cpp b/third_party/WebKit/Source/core/frame/Location.cpp
index bd0a124a03f8aa684b83958ee7e6daab827d8aeb..dd3626cd98591d2e1165d3b24faaf97c06725c39 100644
--- a/third_party/WebKit/Source/core/frame/Location.cpp
+++ b/third_party/WebKit/Source/core/frame/Location.cpp
@@ -112,8 +112,9 @@ DOMStringList* Location::ancestorOrigins() const {
if (!m_frame)
return origins;
for (Frame* frame = m_frame->tree().parent(); frame;
- frame = frame->tree().parent())
+ frame = frame->tree().parent()) {
origins->append(frame->securityContext()->getSecurityOrigin()->toString());
+ }
return origins;
}
@@ -255,7 +256,7 @@ void Location::setLocation(const String& url,
LocalDOMWindow* enteredWindow,
ExceptionState* exceptionState,
SetLocation locationPolicy) {
- ASSERT(m_frame);
+ DCHECK(m_frame);
if (!m_frame || !m_frame->host())
return;
@@ -263,11 +264,12 @@ void Location::setLocation(const String& url,
return;
if (!currentWindow->frame()->canNavigate(*m_frame)) {
- if (exceptionState)
+ if (exceptionState) {
exceptionState->throwSecurityError(
"The current window does not have permission to navigate the target "
"frame to '" +
url + "'.");
+ }
return;
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/History.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698