Bug 1425458 - Resource timing entries Workers - part 4 - exposing partial interface, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 24 Jan 2018 17:17:32 +0100
changeset 400803 4186a931f07c6a598db20122fdedf3e35539325d
parent 400802 619d2fe88e78799e1e5606159e228597c07f8021
child 400804 08827b793aff9b41786d28e05fbd08d1328b5a95
push id33319
push useraiakab@mozilla.com
push dateFri, 26 Jan 2018 00:22:49 +0000
treeherdermozilla-central@b5b38db26ed7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1425458
milestone60.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 1425458 - Resource timing entries Workers - part 4 - exposing partial interface, r=smaug
dom/performance/Performance.cpp
dom/webidl/Performance.webidl
--- a/dom/performance/Performance.cpp
+++ b/dom/performance/Performance.cpp
@@ -232,17 +232,16 @@ Performance::ClearUserEntries(const Opti
       ++i;
     }
   }
 }
 
 void
 Performance::ClearResourceTimings()
 {
-  MOZ_ASSERT(NS_IsMainThread());
   mResourceEntries.Clear();
 }
 
 DOMHighResTimeStamp
 Performance::RoundTime(double aTime) const
 {
   // Round down to the nearest 20us, because if the timer is too accurate people
   // can do nasty timing attacks with it.
--- a/dom/webidl/Performance.webidl
+++ b/dom/webidl/Performance.webidl
@@ -37,17 +37,17 @@ partial interface Performance {
 partial interface Performance {
   PerformanceEntryList getEntries();
   PerformanceEntryList getEntriesByType(DOMString entryType);
   PerformanceEntryList getEntriesByName(DOMString name, optional DOMString
     entryType);
 };
 
 // http://www.w3.org/TR/resource-timing/#extensions-performance-interface
-[Exposed=Window]
+[Exposed=(Window,Worker)]
 partial interface Performance {
   void clearResourceTimings();
   void setResourceTimingBufferSize(unsigned long maxSize);
   attribute EventHandler onresourcetimingbufferfull;
 };
 
 // GC microbenchmarks, pref-guarded, not for general use (bug 1125412)
 [Exposed=Window]