Files
palemoon27/dom/messages/SystemMessageCache.js
T
roytam1 2a3dd7f84c import change from rmottola/Arctic-Fox:
- Bug 1139453 - Send network UP/DOWN events on desktop Linux. (7466c1298)
- Bug 1141488 - On non-APZ platforms, combine any async transform with the OMTA transform rather than clobbering it the OMTA transform. (fe48d6774)
- Bug 1080752 - Hold wakelock when attempting to connect to push server. (b1e74295f)
- Bug 1126089 - Allow messages to be sent after frame script unload event. (167ebbd9a)
- Bug 1126089 - Add test for pageload event on browser element when tab closed (f2011e6e4)
- Bug 1090921 - Logging to see which tasks remain alive too long (ebfc3c9bd)
- Bug 1142544 - delete now-unnecessary |extern "C++"| block from nsISupportsUtils.h; r=mccr8 (07e6572f8)
- Bug 1142503 - don't use QueryInterface when the compiler can do the cast for us; r=ehsan (b13219054)
- Bug 1140161 - Sensibly handle patterns with absolute paths in TEST_HARNESS_FILES. (173e369a7)
- Bug 1082510 - When we detect a chrome popup at the current event coordinates and remote content has the mouse captured, release capture. r=Enn (da9fe26a7)
- Bug 1137722 - Ensure that system message cache is refreshed before openapp. r=fabrice (97dc41f50)
- Bug 1139904 - Add initial test runtime files for mochitest browser-chrome and devtools (9837c79b1)
- Bug 1061604 part.1 nsTextStore::GetTextExt() should rReturn previous character rect instead of TS_E_NOLAYOUT when Google Japanese Input retrieves first character of selected clause at composing r=emk (54779d30e)
- Bug 1061604 part.2 nsTextStore::GetTextExt() should rReturn previous character rect of modified range instead of TS_E_NOLAYOUT when Google Japanese Input retrieves caret rect during composition r=emk (ba7f93879)
- Bug 1136051 - component_insert_pair statrs checks only while we are still checking or haven't started pairing; (ae1ae1d4f)
- Bug 1137007 - Detect namespace and SECCOMP_FILTER_FLAG_TSYNC support in SandboxInfo. r=kang, r=Unfocused (6d9e32a8f)
- Bug 1142263 - Specify all syscall parameters when doing CLONE_NEWUSER detection; f=bwc r=kang (8bcba1831)
-  Bug 1142567 - Remove FAIL_ON_WARNINGS_DEBUG; It is not used. (bf22f1ccf)
- No bug - Add an explanatory message to the multiple-inheritance assertion in DOM bindings; # (ffd94ef07)
- Bug 1141252. Don't mark the TablePainter display item as having background-attachment:fixed content if the background-attachment:fixed image will be painted by a dedicated nsDisplayTableCellBackground. r=mats (98287b37c)
- Bug 1140084 - delete list of script counts in tail-recursive fashion. (90a2b7c45)
- Bug 1048741 - [WebGL2] texParameter: Fix silly bug in TEXTURE_COMPARE_FUNC handling. (ccc90dae3)
- Bug 1142478. Fix integer attribute parsing to not lose track of leading zeroes. (d596a1ce1)
- Bug 1139388 - Remove superfluous locking in the OS X profiler implementation to fix deadlock. (r=mstange) (a13088958)
- Bug 1128603: Remove findReferences and the tests that use it. (bccc64734)
- Bug 1140683: Fix async plugin init using null plugin funcs on MacOSX (47b591d54)
- Bug 1142494 - Fix OSX packaging mistake. (15555f4ee)
- Bug 1136784 - Add screenshot to LogShake produced data. (7ff264243)
- Bug 1142550 - Fix screenshot. (d684b6469)
- Bug 1142006 - Set MACOSX_DEPLOYMENT_TARGET earlier. r=mshal (c333b954e)
- Bug 1100966 - Remember all ranges for all selections when joining nodes in the editor transactions; r=roc (bf34bd0c8)
- Bug 1136507 - L8, LA8, and A8 should not be renderable. (96e807795)
- Bug 1128019 - Init SCISSOR_BOX with initial width and height. (7258cc44c)
- Bug 1142211 - Add layerization testing mechanisms to reftest. r=roc (4c6aa11f8)
- Bug 1106905 - Modify mobile desktop mode implementation to use a desktop viewport. (644ede0e7)
- Bug 1139675 - Simplify the APIs for getting and setting the pres shell resolution. r=mstange,mattwoodrow (c520a8c98)
- Bug 1141563 - Don't update Shapes in parallel after compacting GC (098af79c9)
2019-07-13 08:35:45 +08:00

84 lines
2.4 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/. */
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
"@mozilla.org/childprocessmessagemanager;1",
"nsISyncMessageSender");
function debug(aMsg) {
// dump("-- SystemMessageCache " + Date.now() + " : " + aMsg + "\n");
}
const kMessages = ["SystemMessageCache:RefreshCache"];
function SystemMessageCache() {
debug("init");
this._pagesCache = [];
Services.obs.addObserver(this, "xpcom-shutdown", false);
kMessages.forEach(function(aMessage) {
cpmm.addMessageListener(aMessage, this);
}, this);
}
SystemMessageCache.prototype = {
observe: function(aSubject, aTopic, aData) {
switch (aTopic) {
case "xpcom-shutdown":
debug("received xpcom-shutdown");
kMessages.forEach(function(aMessage) {
cpmm.removeMessageListener(aMessage, this);
}, this);
Services.obs.removeObserver(this, "xpcom-shutdown");
cpmm = null;
break;
default:
break;
}
},
receiveMessage: function(aMessage) {
switch (aMessage.name) {
case "SystemMessageCache:RefreshCache":
this._pagesCache = aMessage.data;
debug("received RefreshCache");
break;
default:
debug("received unknown message " + aMessage.name);
break;
}
},
hasPendingMessage: function(aType, aPageURL, aManifestURL) {
let hasMessage = this._pagesCache.some(function(aPage) {
if (aPage.type === aType &&
aPage.pageURL === aPageURL &&
aPage.manifestURL === aManifestURL) {
return true;
}
return false;
}, this);
debug("hasPendingMessage " + aType + " " + aPageURL + " " +
aManifestURL + ": " + hasMessage);
return hasMessage;
},
classID: Components.ID("{5a19d86a-21e5-4ac8-9634-8c364c73f87f}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsISystemMessageCache,
Ci.nsIMessageListener,
Ci.nsIObserver])
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SystemMessageCache]);