mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-07-20 22:19:49 +00:00
8390173396
- Bug 1219711 - Let fake stream take precedence in testing. r=jib (a52bad675a)
- Bug 1207288. Enable the ANGLE shader validator for WebGL 2. r=jgilbert (9583083fe3)
- Bug 1218944. Transform feedback linking should use varyings intead of attribs. r=jgilbert (37742a04e0)
- Bug 1218939. Fixup GetTransformFeedbackVarying. r=jgilbert (5e4ffd63e5)
- Bug 1218559. Implement FindUniformBlockByMappedName. r=jgilbert (0eefbc1012)
- Bug 1215296. Map uniforms from blocks. r=jgilbert (f87ecddafa)
- Bug 1217304: P1. Only fire loadeddata once the first frame has been decoded. r=jwwang (8382426465)
- Bug 1217304: P2. Do not transition to HAVE_ENOUGH_DATA readyState until we do have data. r=jwwang (b17554f65f)
- Bug 1207887 - Fix AsyncPanZoomAnimation, WheelScrollAnimation and TextureHost doesn't compile in non-unified build. r=nical (9f893b3584)
- Bug 1145004 - Fix MSE Telemetry VIDEO_MSE_BUFFERING_COUNT - r=cpearce (bdcab5af5a)
- Bug 1205156 - Add telemetry to measure how often getUserMedia is used over non-secure origins r=jib (f456298e6e)
- Bug 1206900: Add telemetry for device types captured with getUserMedia() r=jib,smaug (5e278764dd)
- Bug 1144975 - Video dimensions for tab mirroring can be smaller than the devices display. r=snorp (c5781eca2d)
- Bug 1193075 - add viewport constraints for independent scrolling in tab sharing. r=smaug, r=jesup (f9243c0e97)
- bug 1221855 null-check mInputBuffer in SizeOfExcludingThis() r=padenot (d3cd52cfda)
- Bug 1193075 - make { scrollWithPage: false } not scroll with page. r=jesup (3f4aa04ba4)
- Bug 1212633 - include mobile and unfiled folders in Sync's concept of 'all IDs'. r=rnewman (908001a794)
- Bug 1217077 - Remove for-each from services/. r=gps (98a7a1d49d)
66 lines
1.6 KiB
JavaScript
66 lines
1.6 KiB
JavaScript
/* 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/. */
|
|
|
|
this.EXPORTED_SYMBOLS = ["EventSource"];
|
|
|
|
Components.utils.import("resource://services-common/utils.js");
|
|
|
|
var EventSource = function (types, suspendFunc, resumeFunc) {
|
|
this.listeners = new Map();
|
|
for (let type of types) {
|
|
this.listeners.set(type, new Set());
|
|
}
|
|
|
|
this.suspend = suspendFunc || function () {};
|
|
this.resume = resumeFunc || function () {};
|
|
|
|
this.addEventListener = this.addEventListener.bind(this);
|
|
this.removeEventListener = this.removeEventListener.bind(this);
|
|
};
|
|
|
|
EventSource.prototype = {
|
|
addEventListener: function (type, listener) {
|
|
if (!this.listeners.has(type)) {
|
|
return;
|
|
}
|
|
this.listeners.get(type).add(listener);
|
|
this.resume();
|
|
},
|
|
|
|
removeEventListener: function (type, listener) {
|
|
if (!this.listeners.has(type)) {
|
|
return;
|
|
}
|
|
this.listeners.get(type).delete(listener);
|
|
if (!this.hasListeners()) {
|
|
this.suspend();
|
|
}
|
|
},
|
|
|
|
hasListeners: function () {
|
|
for (let l of this.listeners.values()) {
|
|
if (l.size > 0) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
},
|
|
|
|
emit: function (type, arg) {
|
|
if (!this.listeners.has(type)) {
|
|
return;
|
|
}
|
|
CommonUtils.nextTick(
|
|
function () {
|
|
for (let listener of this.listeners.get(type)) {
|
|
listener.call(undefined, arg);
|
|
}
|
|
},
|
|
this
|
|
);
|
|
},
|
|
};
|
|
|
|
this.EventSource = EventSource;
|