mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 854196 - Don't call GetWindowInternal directly, and make assertions harder to ignore; r=bz
This commit is contained in:
parent
0d51d547b4
commit
957e2e77af
@ -4142,8 +4142,8 @@ nsDocument::SetScriptGlobalObject(nsIScriptGlobalObject *aScriptGlobalObject)
|
||||
nsIScriptGlobalObject*
|
||||
nsDocument::GetScriptHandlingObjectInternal() const
|
||||
{
|
||||
NS_ASSERTION(!mScriptGlobalObject,
|
||||
"Do not call this when mScriptGlobalObject is set!");
|
||||
MOZ_ASSERT(!mScriptGlobalObject,
|
||||
"Do not call this when mScriptGlobalObject is set!");
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> scriptHandlingObject =
|
||||
do_QueryReferent(mScriptObject);
|
||||
@ -4175,7 +4175,7 @@ nsDocument::SetScriptHandlingObject(nsIScriptGlobalObject* aScriptObject)
|
||||
nsPIDOMWindow *
|
||||
nsDocument::GetWindowInternal() const
|
||||
{
|
||||
NS_ASSERTION(!mWindow, "This should not be called when mWindow is not null!");
|
||||
MOZ_ASSERT(!mWindow, "This should not be called when mWindow is not null!");
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> win(do_QueryInterface(GetScriptGlobalObject()));
|
||||
|
||||
@ -4189,8 +4189,8 @@ nsDocument::GetWindowInternal() const
|
||||
nsPIDOMWindow *
|
||||
nsDocument::GetInnerWindowInternal()
|
||||
{
|
||||
NS_ASSERTION(mRemovedFromDocShell,
|
||||
"This document should have been removed from docshell!");
|
||||
MOZ_ASSERT(mRemovedFromDocShell,
|
||||
"This document should have been removed from docshell!");
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> win(do_QueryInterface(GetScriptGlobalObject()));
|
||||
|
||||
|
@ -1421,7 +1421,7 @@ nsHTMLDocument::Open(JSContext* /* unused */,
|
||||
NS_ASSERTION(nsContentUtils::CanCallerAccess(static_cast<nsIDOMHTMLDocument*>(this)),
|
||||
"XOW should have caught this!");
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> window = GetWindowInternal();
|
||||
nsCOMPtr<nsIDOMWindow> window = GetWindow();
|
||||
if (!window) {
|
||||
rv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
|
||||
return nullptr;
|
||||
|
@ -18,8 +18,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=741266
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
SimpleTest.expectAssertions(1);
|
||||
|
||||
/** Test for Bug 741266 **/
|
||||
var w = window.open("", "", "width=100,height=100");
|
||||
is(w.innerHeight, 100, "Popup height should be 100 when opened with window.open");
|
||||
|
Loading…
Reference in New Issue
Block a user