From d78f4aec16ddcc7c715ccc2b7f37a8c4bd3ae676 Mon Sep 17 00:00:00 2001 From: Ben Kelly Date: Thu, 21 Apr 2016 16:10:40 -0700 Subject: [PATCH] Bug 1265795 P3 Assert that controlled documents have an outer window. r=bz --- dom/workers/ServiceWorkerManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index 242b67a825f5..ac20c90fe25f 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -2787,6 +2787,10 @@ ServiceWorkerManager::GetAllClients(nsIPrincipal* aPrincipal, } nsCOMPtr doc = do_QueryInterface(iter.Key()); + + // All controlled documents must have an outer window. + MOZ_ASSERT(doc->GetWindow()); + ProcessDocument(aPrincipal, doc); } }