Bug 1271487 - Enable PerformanceObserver API in nightly by default. r?baku
MozReview-Commit-ID: 7v5KhZdVuSm
--- a/dom/base/PerformanceObserver.cpp
+++ b/dom/base/PerformanceObserver.cpp
@@ -130,20 +130,19 @@ PerformanceObserver::QueueEntry(Performa
aEntry->GetEntryType(entryType);
if (!mEntryTypes.Contains<nsString>(entryType)) {
return;
}
mQueuedEntries.AppendElement(aEntry);
}
-static const char16_t* sValidTypeNames[5] = {
+static const char16_t* sValidTypeNames[4] = {
MOZ_UTF16("mark"),
MOZ_UTF16("measure"),
- MOZ_UTF16("navigation"),
MOZ_UTF16("resource"),
MOZ_UTF16("server")
};
void
PerformanceObserver::Observe(const PerformanceObserverInit& aOptions,
ErrorResult& aRv)
{
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -903,16 +903,20 @@ var interfaceNamesInGlobalScope =
"PerformanceEntry",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceMark",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceMeasure",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceNavigation",
// IMPORTANT: Do not change this list without review from a DOM peer!
+ {name: "PerformanceObserver", nightly: true},
+// IMPORTANT: Do not change this list without review from a DOM peer!
+ {name: "PerformanceObserverEntryList", nightly: true},
+// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceResourceTiming",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceTiming",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PeriodicWave",
// IMPORTANT: Do not change this list without review from a DOM peer!
"Permissions",
// IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/webidl/PerformanceObserver.webidl
+++ b/dom/webidl/PerformanceObserver.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
- * https://w3c.github.io/performance-timeline/#the-performance-observer-interface
+ * https://w3c.github.io/performance-timeline/#the-performanceobserver-interface
*/
dictionary PerformanceObserverInit {
required sequence<DOMString> entryTypes;
};
callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries, PerformanceObserver observer);
--- a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
+++ b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
@@ -168,16 +168,20 @@ var interfaceNamesInGlobalScope =
"Performance",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceEntry",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceMark",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceMeasure",
// IMPORTANT: Do not change this list without review from a DOM peer!
+ { name: "PerformanceObserver", nightly: true },
+// IMPORTANT: Do not change this list without review from a DOM peer!
+ { name: "PerformanceObserverEntryList", nightly: true },
+// IMPORTANT: Do not change this list without review from a DOM peer!
"Promise",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushEvent", b2g: false, android: false, nightlyAndroid: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushManager", b2g: false, android: false, nightlyAndroid: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushMessageData", b2g: false, android: false, nightlyAndroid: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/workers/test/test_worker_interfaces.js
+++ b/dom/workers/test/test_worker_interfaces.js
@@ -158,16 +158,20 @@ var interfaceNamesInGlobalScope =
"Performance",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceEntry",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceMark",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceMeasure",
// IMPORTANT: Do not change this list without review from a DOM peer!
+ { name: "PerformanceObserver", nightly: true },
+// IMPORTANT: Do not change this list without review from a DOM peer!
+ { name: "PerformanceObserverEntryList", nightly: true },
+// IMPORTANT: Do not change this list without review from a DOM peer!
"Promise",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushManager", b2g: false, nightlyAndroid: true, android: false },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushSubscription", b2g: false, nightlyAndroid: true, android: false },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushSubscriptionOptions", b2g: false, nightlyAndroid: true, android: false },
// IMPORTANT: Do not change this list without review from a DOM peer!
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -162,16 +162,23 @@ pref("dom.enable_resource_timing", true)
pref("dom.enable_user_timing", true);
// Enable printing performance marks/measures to log
pref("dom.performance.enable_user_timing_logging", false);
// Enable notification of performance timing
pref("dom.performance.enable_notify_performance_timing", false);
+// Enable Performance Observer API
+#ifdef NIGHTLY_BUILD
+pref("dom.enable_performance_observer", true);
+#else
+pref("dom.enable_performance_observer", false);
+#endif
+
// Whether the Gamepad API is enabled
pref("dom.gamepad.enabled", true);
#ifdef RELEASE_BUILD
pref("dom.gamepad.non_standard_events.enabled", false);
#else
pref("dom.gamepad.non_standard_events.enabled", true);
#endif
deleted file mode 100644
--- a/testing/web-platform/meta/performance-timeline/idlharness.html.ini
+++ /dev/null
@@ -1,47 +0,0 @@
-[idlharness.html]
- type: testharness
- [PerformanceObserverEntryList interface: existence and properties of interface object]
- expected: FAIL
-
- [PerformanceObserverEntryList interface object length]
- expected: FAIL
-
- [PerformanceObserverEntryList interface object name]
- expected: FAIL
-
- [PerformanceObserverEntryList interface: existence and properties of interface prototype object]
- expected: FAIL
-
- [PerformanceObserverEntryList interface: existence and properties of interface prototype object's "constructor" property]
- expected: FAIL
-
- [PerformanceObserverEntryList interface: operation getEntries(PerformanceEntryFilterOptions)]
- expected: FAIL
-
- [PerformanceObserverEntryList interface: operation getEntriesByType(DOMString)]
- expected: FAIL
-
- [PerformanceObserverEntryList interface: operation getEntriesByName(DOMString,DOMString)]
- expected: FAIL
-
- [PerformanceObserver interface: existence and properties of interface object]
- expected: FAIL
-
- [PerformanceObserver interface object length]
- expected: FAIL
-
- [PerformanceObserver interface object name]
- expected: FAIL
-
- [PerformanceObserver interface: existence and properties of interface prototype object]
- expected: FAIL
-
- [PerformanceObserver interface: existence and properties of interface prototype object's "constructor" property]
- expected: FAIL
-
- [PerformanceObserver interface: operation observe(PerformanceObserverInit)]
- expected: FAIL
-
- [PerformanceObserver interface: operation disconnect()]
- expected: FAIL
-
--- a/testing/web-platform/meta/performance-timeline/po-disconnect.html.ini
+++ b/testing/web-platform/meta/performance-timeline/po-disconnect.html.ini
@@ -1,11 +1,6 @@
[po-disconnect.html]
type: testharness
- [disconnected callbacks must not be invoked]
- expected: FAIL
+ expected: TIMEOUT
+ [An observer disconnected after a mark must receive the mark]
+ expected: TIMEOUT
- [disconnecting an unconnected observer is a no-op]
- expected: FAIL
-
- [An observer disconnected after a mark must receive the mark]
- expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/performance-timeline/po-mark-measure.html.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[po-mark-measure.html]
- type: testharness
- [entries are observable]
- expected: FAIL
-
- [mark entries are observable]
- expected: FAIL
-
- [measure entries are observable]
- expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/performance-timeline/po-observe.html.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[po-observe.html]
- type: testharness
- [no entryTypes throws a TypeError]
- expected: FAIL
-
- [Empty sequence entryTypes throws a TypeError]
- expected: FAIL
-
- [Filter unsupported entryType entryType names within the entryTypes sequence]
- expected: FAIL
-
- [replace observer if already present]
- expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/performance-timeline/po-resource.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[po-resource.html]
- type: testharness
- [resource entries are observable]
- expected: FAIL
-