mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 13:54:27 +00:00
Bug 1400139 part 3. Add a use counter when the window.content getter is called from untrusted code. r=mystor
MozReview-Commit-ID: LFMK7lxs46Z
This commit is contained in:
parent
3dc9073bd5
commit
c1bab3a2f8
@ -50,3 +50,4 @@ DEPRECATED_OPERATION(ImageBitmapRenderingContext_TransferImageBitmap)
|
||||
DEPRECATED_OPERATION(URLCreateObjectURL_MediaStream)
|
||||
DEPRECATED_OPERATION(XMLBaseAttribute)
|
||||
DEPRECATED_OPERATION(XMLBaseAttributeForStyleAttr)
|
||||
DEPRECATED_OPERATION(WindowContentUntrusted)
|
||||
|
@ -4989,6 +4989,9 @@ nsGlobalWindow::GetContentInternal(ErrorResult& aError, CallerType aCallerType)
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> primaryContent;
|
||||
if (aCallerType != CallerType::System) {
|
||||
if (mDoc) {
|
||||
mDoc->WarnOnceAbout(nsIDocument::eWindowContentUntrusted);
|
||||
}
|
||||
// If we're called by non-chrome code, make sure we don't return
|
||||
// the primary content window if the calling tab is hidden. In
|
||||
// such a case we return the same-type root in the hidden tab,
|
||||
|
@ -330,6 +330,8 @@ MozAutoGainControlWarning=mozAutoGainControl is deprecated. Use autoGainControl
|
||||
MozNoiseSuppressionWarning=mozNoiseSuppression is deprecated. Use noiseSuppression instead.
|
||||
# LOCALIZATION NOTE: Do not translate xml:base.
|
||||
XMLBaseAttributeWarning=Use of xml:base attribute is deprecated and will be removed soon. Please remove any use of it.
|
||||
# LOCALIZATION NOTE: Do not translate "content", "Window", and "window.top"
|
||||
WindowContentUntrustedWarning=The ‘content’ attribute of Window objects is deprecated. Please use ‘window.top’ instead.
|
||||
# LOCALIZATION NOTE: %S is the tag name of the element that starts the loop
|
||||
SVGReferenceLoopWarning=There is an SVG <%S> reference loop in this document, which will prevent the document rendering correctly.
|
||||
# LOCALIZATION NOTE: %S is the tag name of the element that starts the chain
|
||||
|
Loading…
Reference in New Issue
Block a user