Bug 1481195 - The current document should have access to its PerformanceTimingData, r=valentin
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 06 Aug 2018 21:27:00 +0200
changeset 430250 96a7f93d60a9fe1b3a929810d3d8d7a8f8bde00e
parent 430249 ba5c08f10923c181c30ef42b371ed9009974911d
child 430251 f0edb2e07f56b63a19e2382593fccf9ae0d36cc8
child 430262 588a314db0d5d2f7d1b758d09f170e3afb1283a3
push id106105
push useramarchesini@mozilla.com
push dateMon, 06 Aug 2018 19:27:25 +0000
treeherdermozilla-inbound@96a7f93d60a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1481195
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1481195 - The current document should have access to its PerformanceTimingData, r=valentin
dom/performance/PerformanceTiming.cpp
testing/web-platform/meta/navigation-timing/nav2_test_attributes_values.html.ini
testing/web-platform/meta/server-timing/test_server_timing.https.html.ini
--- a/dom/performance/PerformanceTiming.cpp
+++ b/dom/performance/PerformanceTiming.cpp
@@ -281,21 +281,19 @@ PerformanceTimingData::CheckAllowedOrigi
 
   // Check that the current document passes the ckeck.
   nsCOMPtr<nsILoadInfo> loadInfo;
   aResourceChannel->GetLoadInfo(getter_AddRefs(loadInfo));
   if (!loadInfo) {
     return false;
   }
 
-  // TYPE_DOCUMENT loads have no loadingPrincipal.  And that's OK, because we
-  // never actually need to have a performance timing entry for TYPE_DOCUMENT
-  // loads.
+  // TYPE_DOCUMENT loads have no loadingPrincipal.
   if (loadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_DOCUMENT) {
-    return false;
+    return true;
   }
 
   nsCOMPtr<nsIPrincipal> principal = loadInfo->LoadingPrincipal();
 
   // Check if the resource is either same origin as the page that started
   // the load, or if the response contains the proper Timing-Allow-Origin
   // header with the domain of the page that started the load.
   return aChannel->TimingAllowCheck(principal);
deleted file mode 100644
--- a/testing/web-platform/meta/navigation-timing/nav2_test_attributes_values.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[nav2_test_attributes_values.html]
-  [Performance navigation timing instance's value is reasonable.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/server-timing/test_server_timing.https.html.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[test_server_timing.https.html]
-  [Untitled]
-    expected: FAIL
-
-  [Entry {"duration":1.1,"name":"metric1","description":"document"} could not be found.]
-    expected: FAIL
-
-  [Entry {"duration":1.2,"name":"metric1","description":"document"} could not be found.]
-    expected: FAIL
-
-  [test_server_timing]
-    expected: FAIL
-