Chromium Code Reviews| Index: Source/bindings/core/v8/WindowProxy.cpp |
| diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp |
| index 0feb32db4bbeed456e71777b4a2346a9e745af64..a6cec28c0ba6bd4a3615bf8fb3c065289dcd5937 100644 |
| --- a/Source/bindings/core/v8/WindowProxy.cpp |
| +++ b/Source/bindings/core/v8/WindowProxy.cpp |
| @@ -454,8 +454,16 @@ void WindowProxy::setSecurityToken(SecurityOrigin* origin) |
| return; |
| } |
| - if (m_world->isPrivateScriptIsolatedWorld()) |
| + if (m_world->isPrivateScriptIsolatedWorld()) { |
| token = "private-script://" + token; |
| + } else if (m_world->isIsolatedWorld()) { |
| + String frameSecurityToken = m_frame->securityContext()->securityOrigin()->toString(); |
| + if (frameSecurityToken.isEmpty() || frameSecurityToken == "null") { |
| + context->UseDefaultSecurityToken(); |
| + return; |
| + } |
| + token = frameSecurityToken + token; |
|
haraken
2015/09/10 23:34:20
Just help me understand: Why do we need to add a p
epertoso
2015/09/11 13:18:22
The rationale here is: the extension can access so
|
| + } |
| CString utf8Token = token.utf8(); |
| // NOTE: V8 does identity comparison in fast path, must use a symbol |