Backed out changeset e54c8d21e4c1 (bug 1266747)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 28 Feb 2017 18:54:24 +0100
changeset 374281 cd6fd1b64337e3dcb5ba31e70a18667d9edfcdaa
parent 374280 d90cb83b58bf0547110d2c82e2b9bec15148c9af
child 374282 901d34864971be110bd875c02ee436db2dd78af9
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1266747
milestone54.0a1
backs oute54c8d21e4c1fa34090ffb2190797be37da6f8fc
Backed out changeset e54c8d21e4c1 (bug 1266747)
dom/workers/ServiceWorkerClient.cpp
dom/workers/ServiceWorkerClient.h
--- a/dom/workers/ServiceWorkerClient.cpp
+++ b/dom/workers/ServiceWorkerClient.cpp
@@ -54,27 +54,22 @@ ServiceWorkerClientInfo::ServiceWorkerCl
   nsCOMPtr<nsIURI> originalURI = aDoc->GetOriginalURI();
   if (originalURI) {
     nsAutoCString spec;
     originalURI->GetSpec(spec);
     CopyUTF8toUTF16(spec, mUrl);
   }
   mVisibilityState = aDoc->VisibilityState();
 
-  mLastFocusTime = aDoc->LastFocusTime();
-
   ErrorResult result;
   mFocused = aDoc->HasFocus(result);
   if (result.Failed()) {
     NS_WARNING("Failed to get focus information.");
   }
 
-  MOZ_ASSERT_IF(mLastFocusTime.IsNull(), !mFocused);
-  MOZ_ASSERT_IF(mFocused, !mLastFocusTime.IsNull());
-
   RefPtr<nsGlobalWindow> outerWindow = nsGlobalWindow::Cast(aDoc->GetWindow());
   if (!outerWindow) {
     MOZ_ASSERT(mFrameType == FrameType::None);
   } else if (!outerWindow->IsTopLevelWindow()) {
     mFrameType = FrameType::Nested;
   } else if (outerWindow->HadOriginalOpener()) {
     mFrameType = FrameType::Auxiliary;
   } else {
--- a/dom/workers/ServiceWorkerClient.h
+++ b/dom/workers/ServiceWorkerClient.h
@@ -41,19 +41,18 @@ public:
 private:
   const mozilla::dom::ClientType mType;
   nsString mClientId;
   uint64_t mWindowId;
   nsString mUrl;
 
   // Window Clients
   VisibilityState mVisibilityState;
+  bool mFocused;
   FrameType mFrameType;
-  TimeStamp mLastFocusTime;
-  bool mFocused;
 };
 
 class ServiceWorkerClient : public nsISupports,
                             public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ServiceWorkerClient)