| 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;
|
| }
|
|
|
|
|