Attachment #8979178: performance4.patch for bug #1462883

View | Details | Raw Unified | Return to bug 1462883
Collapse All | Expand All

(-)a/dom/base/nsGlobalWindowInner.cpp (-1 / +7 lines)
Line     Link Here 
 Lines 1691-1710   nsGlobalWindowInner::InnerSetNewDocument Link Here 
1691
  if (MOZ_LOG_TEST(gDOMLeakPRLogInner, LogLevel::Debug)) {
1691
  if (MOZ_LOG_TEST(gDOMLeakPRLogInner, LogLevel::Debug)) {
1692
    nsIURI *uri = aDocument->GetDocumentURI();
1692
    nsIURI *uri = aDocument->GetDocumentURI();
1693
    MOZ_LOG(gDOMLeakPRLogInner, LogLevel::Debug,
1693
    MOZ_LOG(gDOMLeakPRLogInner, LogLevel::Debug,
1694
            ("DOMWINDOW %p SetNewDocument %s",
1694
            ("DOMWINDOW %p SetNewDocument %s",
1695
             this, uri ? uri->GetSpecOrDefault().get() : ""));
1695
             this, uri ? uri->GetSpecOrDefault().get() : ""));
1696
  }
1696
  }
1697
1697
1698
  mDoc = aDocument;
1698
  mDoc = aDocument;
1699
  ClearDocumentDependentSlots(aCx);
1700
  mFocusedElement = nullptr;
1699
  mFocusedElement = nullptr;
1701
  mLocalStorage = nullptr;
1700
  mLocalStorage = nullptr;
1702
  mSessionStorage = nullptr;
1701
  mSessionStorage = nullptr;
1702
  mPerformance = nullptr;
1703
1704
  // This must be called after nullifying the internal objects because here we
1705
  // could recreate them, calling the getter methods, and store them into the JS
1706
  // slots. If we nullify them after, the slot values and the objects will be
1707
  // out of sync.
1708
  ClearDocumentDependentSlots(aCx);
1703
1709
1704
#ifdef DEBUG
1710
#ifdef DEBUG
1705
  mLastOpenedURI = aDocument->GetDocumentURI();
1711
  mLastOpenedURI = aDocument->GetDocumentURI();
1706
#endif
1712
#endif
1707
1713
1708
  Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS,
1714
  Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS,
1709
                        mMutationBits ? 1 : 0);
1715
                        mMutationBits ? 1 : 0);
1710
1716
(-)a/dom/base/nsGlobalWindowOuter.cpp (-1 / +6 lines)
Line     Link Here 
 Lines 1938-1954   nsGlobalWindowOuter::SetNewDocument(nsID Link Here 
1938
1938
1939
      if (newInnerWindow->mDoc != aDocument) {
1939
      if (newInnerWindow->mDoc != aDocument) {
1940
        newInnerWindow->mDoc = aDocument;
1940
        newInnerWindow->mDoc = aDocument;
1941
1941
1942
        // The storage objects contain the URL of the window. We have to
1942
        // The storage objects contain the URL of the window. We have to
1943
        // recreate them when the innerWindow is reused.
1943
        // recreate them when the innerWindow is reused.
1944
        newInnerWindow->mLocalStorage = nullptr;
1944
        newInnerWindow->mLocalStorage = nullptr;
1945
        newInnerWindow->mSessionStorage = nullptr;
1945
        newInnerWindow->mSessionStorage = nullptr;
1946
1946
        newInnerWindow->mPerformance = nullptr;
1947
1948
        // This must be called after nullifying the internal objects because
1949
        // here we could recreate them, calling the getter methods, and store
1950
        // them into the JS slots. If we nullify them after, the slot values and
1951
        // the objects will be out of sync.
1947
        newInnerWindow->ClearDocumentDependentSlots(cx);
1952
        newInnerWindow->ClearDocumentDependentSlots(cx);
1948
1953
1949
        // When replacing an initial about:blank document we call
1954
        // When replacing an initial about:blank document we call
1950
        // ExecutionReady again to update the client creation URL.
1955
        // ExecutionReady again to update the client creation URL.
1951
        rv = newInnerWindow->ExecutionReady();
1956
        rv = newInnerWindow->ExecutionReady();
1952
        NS_ENSURE_SUCCESS(rv, rv);
1957
        NS_ENSURE_SUCCESS(rv, rv);
1953
      }
1958
      }
1954
    } else {
1959
    } else {
(-)a/testing/web-platform/meta/navigation-timing/po-navigation.html.ini (-4 lines)
Line     Link Here 
 Lines 1-4    Link Here 
1
[po-navigation.html]
2
  [navigation entry is observable]
3
    expected: FAIL
4

Return to bug 1462883