Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the 'current' global object. #14647

Merged
merged 4 commits into from Dec 29, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Implement correct security checks for HTMLIFrameElement::contentDocum…

…ent.

Fixes #10964.
  • Loading branch information
Ms2ger committed Dec 23, 2016
commit d49e34c1b1e6e3759633c9315a3e02dde091546c
@@ -332,11 +332,9 @@ impl HTMLIFrameElement {
self.pipeline_id.get()
.and_then(|pipeline_id| ScriptThread::find_document(pipeline_id))
.and_then(|document| {
// FIXME(#10964): this should use the Document's origin and the
// origin of the incumbent settings object.
let contained_url = document.global().get_url();
if self.global().get_url().origin() == contained_url.origin() ||
contained_url.as_str() == "about:blank" {
let current_global = GlobalScope::current();
let current_document = current_global.as_window().Document();
if document.origin().same_origin(current_document.origin()) {
Some(Root::from_ref(document.window()))
} else {
None
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.