Bug 1032415: Mark nsGlobalWindow::GetContextForEventHandlers as inner only. r=smaug

This commit is contained in:
Kyle Huey 2014-07-03 15:19:03 -07:00
parent dc7958f63c
commit 7bd7c639a5

View File

@ -9576,8 +9576,10 @@ nsGlobalWindow::GetExistingListenerManager() const
nsIScriptContext*
nsGlobalWindow::GetContextForEventHandlers(nsresult* aRv)
{
MOZ_ASSERT(IsInnerWindow());
*aRv = NS_ERROR_UNEXPECTED;
NS_ENSURE_TRUE(!IsInnerWindow() || IsCurrentInnerWindow(), nullptr);
NS_ENSURE_TRUE(IsCurrentInnerWindow(), nullptr);
nsIScriptContext* scx;
if ((scx = GetContext())) {