Commit ec7630cc authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

Add a null check in WebLocalFrameImpl::SetIsolatedWorldSecurityOrigin()

https://chromium-review.googlesource.com/752006 added an IsolatedCopy()
call but the SecurityOrigin can be null when
WebLocalFrameImpl::SetIsolatedWorldSecurityOrigin() is called from
TestRunnerForSpecificView::SetIsolatedWorldSecurityOrigin().

Bug: 793649, 779730
Change-Id: I017eec29cc6c8cc9a753181c9b6f335569cccb9f
Reviewed-on: https://chromium-review.googlesource.com/825653
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524542}
parent c1910739
...@@ -666,7 +666,8 @@ void WebLocalFrameImpl::SetIsolatedWorldSecurityOrigin( ...@@ -666,7 +666,8 @@ void WebLocalFrameImpl::SetIsolatedWorldSecurityOrigin(
const WebSecurityOrigin& security_origin) { const WebSecurityOrigin& security_origin) {
DCHECK(GetFrame()); DCHECK(GetFrame());
DOMWrapperWorld::SetIsolatedWorldSecurityOrigin( DOMWrapperWorld::SetIsolatedWorldSecurityOrigin(
world_id, security_origin.Get()->IsolatedCopy()); world_id,
security_origin.Get() ? security_origin.Get()->IsolatedCopy() : nullptr);
} }
void WebLocalFrameImpl::SetIsolatedWorldContentSecurityPolicy( void WebLocalFrameImpl::SetIsolatedWorldContentSecurityPolicy(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment