Blink: Plumb correct security origin for isolated world CSPs.

1395190
This commit is contained in:
deepak1556 2019-01-22 02:15:15 +05:30
parent 2c282203b5
commit 606c84b302
3 changed files with 23 additions and 45 deletions

View file

@ -53,17 +53,20 @@ class WebFrame extends EventEmitter {
// TODO(nitsakh): Remove in 6.0
setIsolatedWorldSecurityOrigin (worldId, securityOrigin) {
deprecate.warn('webFrame.setIsolatedWorldSecurityOrigin', 'webFrame.setIsolatedWorldInfo')
binding._setIsolatedWorldSecurityOrigin(this.context, worldId, securityOrigin)
binding.setIsolatedWorldInfo(this.context, worldId, { securityOrigin })
}
setIsolatedWorldContentSecurityPolicy (worldId, csp) {
deprecate.warn('webFrame.setIsolatedWorldContentSecurityPolicy', 'webFrame.setIsolatedWorldInfo')
binding._setIsolatedWorldContentSecurityPolicy(this.context, worldId, csp)
binding.setIsolatedWorldInfo(this.context, worldId, {
securityOrigin: window.location.origin,
csp
})
}
setIsolatedWorldHumanReadableName (worldId, name) {
deprecate.warn('webFrame.setIsolatedWorldHumanReadableName', 'webFrame.setIsolatedWorldInfo')
binding._setIsolatedWorldHumanReadableName(this.context, worldId, name)
binding.setIsolatedWorldInfo(this.context, worldId, { name })
}
}