mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1261115 - when Console is running in the main thread the existence of mWindow should always be ensured, r=smaug
This commit is contained in:
parent
943d93e831
commit
c4cbf74421
@ -886,6 +886,8 @@ NS_INTERFACE_MAP_END
|
||||
/* static */ already_AddRefed<Console>
|
||||
Console::Create(nsPIDOMWindowInner* aWindow, ErrorResult& aRv)
|
||||
{
|
||||
MOZ_ASSERT_IF(NS_IsMainThread(), aWindow);
|
||||
|
||||
RefPtr<Console> console = new Console(aWindow);
|
||||
console->Initialize(aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
@ -904,6 +906,8 @@ Console::Console(nsPIDOMWindowInner* aWindow)
|
||||
, mInnerID(0)
|
||||
, mStatus(eUnknown)
|
||||
{
|
||||
MOZ_ASSERT_IF(NS_IsMainThread(), aWindow);
|
||||
|
||||
if (mWindow) {
|
||||
MOZ_ASSERT(mWindow->IsInnerWindow());
|
||||
mInnerID = mWindow->WindowID();
|
||||
|
Loading…
Reference in New Issue
Block a user