| Index: third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp b/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp
|
| index 66d06a05a9b42d0b85681c419c004962bee4e494..57016bb4fdfeb0f41caebc28421963b90897a43a 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp
|
| @@ -49,7 +49,11 @@ static bool canAccessFrame(v8::Isolate* isolate, const LocalDOMWindow* accessing
|
| {
|
| ASSERT_WITH_SECURITY_IMPLICATION(!(targetWindow && targetWindow->frame()) || targetWindow == targetWindow->frame()->domWindow());
|
|
|
| - if (isOriginAccessibleFromDOMWindow(targetFrameOrigin, accessingWindow))
|
| + // It's important to check that targetWindow is a LocalDOMWindow: it's
|
| + // possible for a remote frame and local frame to have the same security
|
| + // origin, depending on the model being used to allocate Frames between
|
| + // processes. See https://crbug.com/601629.
|
| + if (targetWindow && targetWindow->isLocalDOMWindow() && isOriginAccessibleFromDOMWindow(targetFrameOrigin, accessingWindow))
|
| return true;
|
|
|
| if (targetWindow)
|
| @@ -61,7 +65,11 @@ static bool canAccessFrame(v8::Isolate* isolate, const LocalDOMWindow* accessing
|
| {
|
| ASSERT_WITH_SECURITY_IMPLICATION(!(targetWindow && targetWindow->frame()) || targetWindow == targetWindow->frame()->domWindow());
|
|
|
| - if (isOriginAccessibleFromDOMWindow(targetFrameOrigin, accessingWindow))
|
| + // It's important to check that targetWindow is a LocalDOMWindow: it's
|
| + // possible for a remote frame and local frame to have the same security
|
| + // origin, depending on the model being used to allocate Frames between
|
| + // processes. See https://crbug.com/601629.
|
| + if (targetWindow->isLocalDOMWindow() && isOriginAccessibleFromDOMWindow(targetFrameOrigin, accessingWindow))
|
| return true;
|
|
|
| if (reportingOption == ReportSecurityError && targetWindow)
|
|
|