Closed Bug 823227 Opened 9 years ago Closed 8 years ago

Make the Global Scope Polluter work for non-html scopes

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: bzbarsky, Assigned: bholley)

References

Details

Attachments

(4 files, 2 obsolete files)

Now that we always have a gsp, we should just do named frame lookups from it.  That's what the spec says to do anyway, and that way we don't have to have weird Window behavior.
Blocks: 824217
No longer blocks: 842259
Depends on: 850517
Attachment #724747 - Flags: review?(mrbkap)
Comment on attachment 724747 [details] [diff] [review]
part 1.  Install a global scope polluter even if we don't have an HTML document.

I'm almost surprised that we already null check everywhere that we need to.
Attachment #724747 - Flags: review?(mrbkap) → review+
Attached patch Now with a test (obsolete) — Splinter Review
Attachment #724747 - Attachment is obsolete: true
I fixed the bug as-filed in bug 850517, but now we're running into problems with the GSP not existing for non-HTML documents. I'm going to use this bug for that, starting with bz's patches.
Summary: Move named frame lookups from nsWindowSH::GetProperty to the global scope polluter → Make the Global Scope Polluter work for non-html scopes
Assignee: bzbarsky → bobbyholley+bmo
Comment on attachment 726216 [details] [diff] [review]
Now with a test

Given that I think we're in a bit of a hurry on this one, I'm going to do the try push and review requests simultaneously.
Attachment #726216 - Attachment is obsolete: true
Attachment #726353 - Flags: review?(bzbarsky)
Attachment #726354 - Flags: review+
Comment on attachment 726351 [details] [diff] [review]
Part 1 - Have the global scope polluter find the document via the global. v1

>+  nullptr

Could just leave it off, too.  Either way.

>+  nsCOMPtr<nsIDOMHTMLDocument> domDoc =

nsIHTMLDocument, please.  Might not be worth worrying about if this code goes away.


r=me
Attachment #726351 - Flags: review?(bzbarsky) → review+
Comment on attachment 726352 [details] [diff] [review]
Part 2 - Resolve named frames for non-HTML documents. v1

Definitely nsIHTMLDocument here, please.  r=me
Attachment #726352 - Flags: review?(bzbarsky) → review+
Comment on attachment 726353 [details] [diff] [review]
Part 3 - Stop pref-controlling the GSP. v1

This is the part mrbkap already reviewed.  So r=, but him not me.  ;)
Attachment #726353 - Flags: review?(bzbarsky) → review+
Duplicate of this bug: 851924
Tracking due to bug 851924, which points to a concerning web regression.
Arg, I wrote "linu64" rather than "linux64", so no try jobs were triggered. Pushing again:

https://tbpl.mozilla.org/?tree=Try&rev=02b3830e01c3
Blocks: 852252
Duplicate of this bug: 852549
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.