Skip to content

Instantly share code, notes, and snippets.

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Tests that preference helpers work properly with custom types of Float and Json.
const { PrefObserver } = require("devtools/client/shared/prefs");
// Use sinon for mocking.
const {sinon} = ChromeUtils.import("resource://testing-common/Sinon.jsm");
commit 387ecfc00706da584966738c193f457e8913a3b6
Author: Jason Laster <jlaster@mozilla.com>
Date: Thu Nov 7 16:20:12 2019 -0800
Whats New
diff --git a/devtools/client/definitions.js b/devtools/client/definitions.js
index 4de05241f2d4..fb4233df7062 100644
--- a/devtools/client/definitions.js
+++ b/devtools/client/definitions.js
@wellington1993
wellington1993 / XPIInstall.jsm
Created May 20, 2020 17:40
view-source:resource://gre/modules/addons/XPIInstall.jsm
/* 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";
/**
* This file contains most of the logic required to install extensions.
* In general, we try to avoid loading it until extension installation
* or update is required. Please keep that in mind when deciding whether
@wellington1993
wellington1993 / DevToolsUtils.js
Created August 26, 2019 17:56
resource://devtools/shared/DevToolsUtils.js
/* 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/. */
/* globals setImmediate, rpc */
"use strict";
/* General utilities used throughout devtools. */
@wellington1993
wellington1993 / kinto-http-client.js
Created January 3, 2020 16:19
resource://services-common/kinto-http-client.js
/*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@hotsoft-desenv2
hotsoft-desenv2 / ToolbarPanelHub.jsm
Created May 20, 2020 05:40
view-source:resource://activity-stream/lib/ToolbarPanelHub.jsm
/* 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 { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
XPCOMUtils.defineLazyModuleGetters(this, {
Services: "resource://gre/modules/Services.jsm",
@wellington1993
wellington1993 / highlighters.js
Created January 15, 2020 21:27
resource://devtools/server/actors/highlighters.js
/* 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, Cu } = require("chrome");
const ChromeUtils = require("ChromeUtils");
const EventEmitter = require("devtools/shared/event-emitter");
@wellington1993
wellington1993 / osfile_async_front.jsm
Created September 15, 2019 00:43
resource://gre/modules/osfile/osfile_async_front.jsm
/* 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/. */
/**
* Asynchronous front-end for OS.File.
*
* This front-end is meant to be imported from the main thread. In turn,
* it spawns one worker (perhaps more in the future) and delegates all
* disk I/O to this worker.
@hotsoft-desenv2
hotsoft-desenv2 / ExtensionChild.jsm
Created May 6, 2020 03:54
view-source:resource://gre/modules/ExtensionChild.jsm
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
/* 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";
/* exported ExtensionChild */
var EXPORTED_SYMBOLS = ["ExtensionChild", "ExtensionActivityLogChild"];
@wellington1993
wellington1993 / loader-plugin-raw.jsm
Created January 11, 2020 00:26
resource://devtools/shared/loader-plugin-raw.jsm
/* 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 { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
/**
* A function that can be used as part of a require hook for a