This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# Parent 1987beeb0038e84eddd39d3026388ba361dc0cf2 | |
Avoid a massive number of XPConnect calls when using memory reporters | |
diff --git a/toolkit/components/aboutmemory/content/aboutMemory.js b/toolkit/components/aboutmemory/content/aboutMemory.js | |
--- a/toolkit/components/aboutmemory/content/aboutMemory.js | |
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js | |
@@ -149,17 +149,13 @@ function minimizeMemoryUsage3x(fAfter) | |
* | |
* @param aMgr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateHTML_ok(nodes) { | |
var result = document.createElement("div"); | |
for (var n = 0; n < nodes.length; ++n) { | |
var node = nodes[n]; | |
var h1 = document.createElement("h1"); | |
h1.textContent = node.localName; | |
result.appendChild(h1); | |
var list = document.createElement("ul"); | |
for (var a = 0; a < node.attributes.length; ++a) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 original author is: Nils Maier <https://tn123.org/> */ | |
"use strict"; | |
const {classes: Cc, interfaces: Ci, utils: Cu} = Components; | |
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a namespace so as not to polute the global namespace | |
if(!com) var com={}; | |
if(!com.morac) com.morac={}; | |
if(!com.morac.SessionManagerAddon) com.morac.SessionManagerAddon={}; | |
// import into the namespace | |
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); | |
Components.utils.import("resource://gre/modules/Services.jsm"); | |
XPCOMUtils.defineLazyServiceGetter(this, "secret_decoder_ring_service", "@mozilla.org/security/sdr;1", "nsISecretDecoderRing"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main Process | |
User Compartments | |
about:blank [3] | |
about:blank, [anonymous sandbox] (from: resource://jid0-zahxu5e9sjk6vvq8up9tqpnlwuk-at-jetpack/api-utils/lib/loader.js -> resource://jid0-zahxu5e9sjk6vvq8up9tqpnlwuk-at-jetpack/api-utils/lib/sandbox.js:18) [4] | |
null-principal | |
System Compartments | |
[System Principal], [anonymous sandbox] (from: resource://gre/modules/XPIProvider.jsm -> jar:file:///Users/maierman/dev/central.p/extensions/[email protected]!/bootstrap.js:202) [2] | |
[System Principal], about:addons [2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var abouts = (function({classes: Cc, interfaces: Ci, utils: Cu}) { | |
const {Services} = Cu.import("resource://gre/modules/Services.jsm", {}); | |
return Object.keys(Cc).map(function(e) { | |
var m = e.match(/about;1\?what=(.+)$/); | |
if (!m) | |
return null; | |
m = "about:" + m[1]; | |
var s = Cc[e].getService(Ci.nsIAboutModule); | |
if (!(s.getURIFlags(Services.io.newURI(m, null, null)) & | |
Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Cc, Ci, Cu} = require("chrome"); | |
const {notify} = require("sdk/notifications"); | |
const {Widget} = require("sdk/widget"); | |
const {Downloads} = Cu.import("resource://gre/modules/Downloads.jsm", {}); | |
const {Services} = Cu.import("resource://gre/modules/Services.jsm", {}); | |
const {Task} = Cu.import("resource://gre/modules/Task.jsm", {}); | |
function download() { | |
Task.spawn(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nmaier.so_der; | |
public class Program { | |
static class Piece {} | |
static class Man extends Piece{} | |
static class Square { | |
private Piece p_; | |
public Square(Piece p) { | |
p_ = p; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Any copyright is dedicated to the Public Domain. | |
http://creativecommons.org/publicdomain/zero/1.0/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function uninstall() { | |
Components.utils.reportError("uninstall!"); | |
} | |
function startup() { | |
Components.utils.reportError("startup!"); | |
} | |
function shutdown() { | |
Components.utils.reportError("shutdown!"); | |
} |