Files
roytam1 ba8690b75e import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1254848 part 1. Take ownership of error reporting on the AutoEntryScript in mozJSComponentLoader::ObjectForLocation. r=bholley (39b4b835e2)
- Bug 1254848 part 2. Take ownership of error reporting on the AutoEntryScript in mozJSComponentLoader::PrepareObjectForLocation. r=bholley (d0ca0f3b48)
- Bug 1254848 part 3. Take ownership of error reporting on the AutoEntryScript in AsyncScriptLoader::OnStreamComplete. r=bholley (d9059437f7)
- Bug 1254303 - Remove SEC_NORMAL from js/. r=sicking (a05bb976fc)
- Bug 1137151: Marked destructors of ref-counted MTP classes as protected, r=dhylands (683cd78bd7)
- Bug 1167090 - Fix MTP date and time queried through getObjectInfo. r=alchen (d1055dab5b)
- Bug 1188796 - Have MTP record modified timestamps when they're passed. r=alchen (7e09ea19c0)
- Bug 1205028 - Don't tell MTP server about files that it added/modified. r=alchen (65d84062ad)
- Bug 1174228 - Set up TYPE_APP for navigator.getDeviceStorage for B2GDroid r=dhylands (5cd46dda53)
- Bug 1242899 - consolidate mozApps tests into dom/apps/tests/ dir; r=marco (9208d75401)
- Bug 1238160 - Add assertions in non-desktop code paths. r=bz,fabrice (96ea4796b5)
- Bug 1238079 - remove the desktop web runtime; r=fabrice,mossop,gps,jryans,jmaher,marco (3a77fa1f59)
- Bug 1250453 - Remove DOMApplicationRegistry._isLaunchable property. r=myk (a20ad88af5)
- Bug 1176712 - Cannot have two activities with same name and different filters. Tests. r=fabrice (b5cd3f34fa)
- Bug 1251179 - Ensure that the lock protecting the CPU sleep functionality is always valid r=dhylands (dba414ecfa)
- Bug 1253571 - Remove the remaining uses of ScopedDeletePtr and ScopedFreePtr from the HAL and MTP code r=dhylands (a294472d97)
- Bug 1251519 Part 2 - Remove nsLayoutUtils::IsRectVisibleInScrollFrames(). r=mats (c73a0272b7)
- Bug 1212186 - Disable 'layout.word_select.eat_space_to_next_word' in carets tests. r=mtseng (7d231a66bf)
- Bug 1207934 - Fix word_location(). r=automatedtester (6828f466f1)
- Bug 1199625 - Test focus not being changed by long-pressing on non-selectable. r=mtseng (7aefe76cdc)
- Bug 1206545 - Add a marionette test case. r=roc (18e224214c)
- Bug 1209841 - Delete test_selectioncarets2.py. r=automatedtester (99c3d5d144)
- Bug 1221459 - Remove TouchCaret and SelectionCarets from marionette tests. r=mtseng (c9a452fe67)
- Bug 1253989 Part 1 - Remove tests for accessiblecaret preference off. r=mtseng (ddc3c57a93)
- Bug 1253989 Part 2 - Use @parameterized to rewrite cursor mode tests. r=mtseng (5a4cbff605)
- Bug 1201036: Bump marionette client and marionette driver for releases; r=jgriffin (9522a37ce7)
- Bug 1209698: Bump version numbers for Marionette packages; r=jgriffin (6a952dc063)
- Bug 1137972: Centralize unwrapping the response from marionette; r=jgriffin (78d40d42d2)
- Bug 1137972: Send W3C Element Key to Marionette Server from python client; r=jgriffin (074cbdb12c)
- Bug 1185486 - Part 1: Use a timeout when waiting on the browser process after a timed out command. r=jgriffin (ebb6f6421d)
- Bug 1159219: Make ContentSender a separate module (034e08ef83)
- Bug 1159238. Generate UUID internally to ContentSender (be45ead810)
- Bug 1185486 - Part 2: Prevent message listeners from a failed command from causing an out of order response when a content command hangs. r=ato (d706eaba14)
- Bug 1164124 - Add using_prefs context manager. r=jgriffin (f789f9a6fa)
- Bug 1211503: Support for Marionette protocol level 3 in the Python client (88d062980d)
- Bug 1211503: Support for Marionette protocol level 3 in the Python client (1d805ac020)
- Bug 1216967: Bump Marionette Python packages (5877bcee90)
- cleanup (56b0351ad3)
- Bug 1144240 - Fix generated Marionette documentation. r=ato (6beeb13017)
- Bug 1223171 - [marionette] add ability to install addons programatically, r=ato (c8d04e974a)
- Bug 1223517 - Release marionette-client 2.0.0 and marionette-driver 1.1.1; r=automatedtester (de1c1f1d18)
- Bug 1008453. Add support for navigator.hardwareConcurrency. r=khuey (ebd1c0e2d9)
- Bug 1200409 - |marionette --help| causes stack trace. r=ato (479af08b4f)
- Bug 1212608 - Add parts of firefox_ui_harness to Marionette runner; r=automatedtester (9977013243)
- Bug 1222388: Correct ./mach marionette-test r=ato (27bae1cbf9)
- Bug 1223429 - Return exit code 10 when Marionette harness has failing tests; r=automatedtester (b7b7ba91f4)
- Bug 1227918 - Log exception in harness class setup; r=automatedtester (9708cb7113)
- Bug 1221187: testing/marionette/client: Explicitly define --version flag; r=automatedtester (6886b6b925)
- Bug 1237179 - Add mach command to run firefox-ui-tests from the source directory. r=gps (3bb6ed2ff0)
- Bug 1208242 - Part 2: WebExtension blocklist tests for b2g r=ferjm (cf19a285a4)
- Bug 1165943 - Remove non existing "security.uri.allow_scheme_mismatch" preference from test. r=nsm (60cdcfc933)
- Bug 1223297 - Add multiple audio channel test. r=baku (55765d11dd)
- Bug 1220221 - Allow B2GDroid apps to be debugged using Web IDE. r=jryans (f2c4272317)
- Bug 1198877 - Enable mulet's support in webapps actors. r=jryans (ab5ec4654d)
- Bug 1250453 - Remove DOMApplicationRegistry.allAppsLaunchable property and related testing API. r=myk (983931229b)
- Bug 1255161 - Remove dom.mozApps.used preference. r=myk (5247455c72)
- Bug 1255036 - Remove mozApps::getNotInstalled. r=myk,ehsan (8a36a194b4)
- Bug 1240860 - Escape attribute name before passing into querySelector;r=tromey (a896327089)
- Bug 1242278 - Eslint cleanup of Inspector markup view r=pbro (88663087d7)
- Bug 1169860 - Increase the timeout of browser_toolbox_options_disable_cache-01.js and browser_toolbox_options_disable_cache-02.js (9932a09fac)
- Bug 1245667 - Use standard license boilerplate in framework js files. r=bgrins (f296c9cfee)
- Bug 1243546 - Add mach command for external-media-tests - r=gps (8c74584251)
- Bug 1239987 - Remove marionette-transport dependency from build environment; r=gps (b5e6166e61)
- Bug 1250748 - Remove the 20s countdown timer from mach first run; r=chmanchester (8755a9b3e0)
- Bug 1238996 - Release marionette-driver 1.2, marionette-transport 1.1, and marionette-client 2.1; r=automatedtester (746bc487a4)
- Bug 1243739 - Bump versions of marionette-driver, marionette-client and marionette-transport. r=ato (c87d6e57f8)
- Bug 1243739: Update marionette-driver dependecy for marionette-transport. r=ato (582a2f8d8e)
- Bug 1239987 - Merge marionette-transport into marionette-driver; r=automatedtester (254ed0727c)
- Bug 1239330 - Support AddonManager.installTemporaryAddon() in marionette_driver.addons, r=ato (1f132b1cb3)
- Bug 1250002 - part1: add loader to globals exposed by require from browser-loader;r=jryans (b21bbfea15)
- Bug 1221141 - Specify absolute path to each about:debugging test file to please Windows. r=me for bustage fix on CLOSED TREE (cd311cffa7)
- Bug 1225473 - Support Service workers in child process. r=janx (68b511ab9a)
- Bug 1228382 - Keep service worker alive when attaching to them. r=janx,ejpbruel (bf0201e624)
- Bug 1232931 - Allow running browser_service_workers_timeout.js more than once. r=janx (e6ef705148)
- Bug 1227135 - about:debugging : disable debug buttons if addons debugging disabled;r=ochameau (832ff1f414)
- Bug 1232931: Wait for service worker registration before attaching a toolbox to it. r=janx (83b86558bc)
- Bug 1245496 - Fix eslint errors in about:debugging. r=janx (4e78f4bcfb)
- Bug 1242469 - Remove the "Enable worker debugging (in development)" checkbox from about:debugging. r=ochameau (3867d0975b)
- Bug 1245029 - aboutdebugging full react refactor part1;r=janx,ochameau (cecad4b36e)
- Bug 1245029 - aboutdebugging full react refactor part2;r=janx,ochameau (7297264e12)
- Bug 1249585 - Rename about:debugging components s/Component//g. r=janx (1828059a3d)
- Bug 1227137 - aboutdebugging: addons debugging enabled only if remote dbg is true;r=ochameau (97f2d8a652)
- Bug 1212797 - Refactor worker actors to protocol.js. r=ochameau (4052a4145c)
- Bug 1212797 - Show all registered service workers in about:debugging. r=ochameau (a91931a241)
- Bug 1250002 - part2: about:debugging switch to browserLoader;r=ochameau (f1d4ce9f08)
- Bug 1241050 - Convert DeveloperToolbar.jsm to commonjs module. r=jwalker (72e4adf1f7)
- Bug 1243406 - enable CSS/SVG/PNG hot reloading for all devtools panels r=bgrins (df16fbb14d)
- Bug 1233888 - Convert to Promise.jsm in app projects. r=ochameau (c9d688829d)
- Bug 1234880 - Part 1: Stop using ObservableObject in app-projects. r=jryans (ddcdb945b9)
- Bug 1234880 - Part 2: Remove ObservableObject. r=jryans (089acbdd6a)
- Bug 1225063 - add option (devtools.markup.collapseAttributes) to enable/disable attribute collapsing from settings panel;r=bgrins (8ad7e6b5cd)
- Bug 1250205 - Clean remaining eslint warnings in devtools/client/inspector/markup/markup.js; r=miker (8214a7d3d6)
- Bug 1203147 - Add a keyboard shortcut for scrolling elements into view in the inspector. r=pbro (ba7accba9d)
- Bug 1248381 - Inspector panel should display properly capitalized node name; r=miker (c843dc93c4)
- Bug 1214352 - Add telemetry for Scratchpad as top level window. r=jryans,p=bsmedberg (f53e9c8644)
- Bug 1239562 - Use explicit events to fix test races in responsive design. r=ochameau (2a6529efab)
- Bug 1245462 - Cleanup various require/import in devtools. r=jryans (f4d696471e)
- Bug 1230622 - Docs: Suggest people use wptserve instead of mozhttpd. r=jgraham (8b1c669740)
- Bug 1174497 - [mozprofile] bump version and release to pypi; r=wlach (0360927850)
- Bug 1014760 - Version bump mozbase modules that depend on mozlog 3.0, r=me (d16b10a25f)
- Bug 1189858 - [mozprofile] remove the manifest parser required dependency. r=ahal (b181c379ce)
- Bug 1189858 - fix typos in pip extra dependency declaration (587697be0d)
- Bug 1199115 - Release mozprofile 0.27. r=jgraham DONTBUILD (a1e1452486)
- Bug 1233534 - [mozprofile] bump version to 0.28. r=ahal (6e17f001dd)
- Bug 1241707 - [e10s] Web Console should restore focus to proper place when closed. r=jryans,r=bgrins (401d0754cc)
- Bug 1245530 - Use require(Services) instead of Cu.import(Services.jsm). r=jryans (7b2312698e)
- Bug 1256401 - Part 2: Remove references to b2gdroid. r=fabrice (1486bf8669)
- Bug 1112920 - Assert against pending exceptions in AutoJSAPI::InitInternal. v1 r=luke,r=smaug (fa9b99c835)
- Fix the asset for bug 1112920 to not touch uninitialized memory. Totally my fault, since I moved it above the mCx assignment, and now we have a CLOSED TREE. (f404994a66)
- Logging patch for bug 1256008. r=khuey (dcb846a987)
- Bug 1255817 part 1. Make AutoJSAPI always take ownership of error reporting. r=bholley (638b9ca3fe)
- Bug 1257306. Simplify the implementation of AutoSafeJSContext (and therefore AutoJSContext, since AutoSafeJSContext will no longer be an AutoJSContext). r=bholley (58b655ad7a)
- Bug 1245951 - "Unused method in WebSocket". r=smaug (b2f8937893)
- Bug 1227136 - crash in mozilla::net::WebSocketChannel::StartWebsocketData, r=bagder, r=baku (5249e56b52)
- Bug 1252751 - Improve the security model between webSocket and sandboxed iframe, r=smaug (9a6c0be275)
- Bug 1250234. Make WebSocket::CreateAndDispatchMessageEvent properly report JS exceptions it might be producing. r=khuey (eaae502684)
- Bug 1255840. Get rid of the AutoJSAPI usage in IDBFactory. r=khuey (d0a965d1aa)
- Bug 1151112 - 'Sending message that cannot be cloned. Are you trying to send an XPCOM object?' seen when unlocking phone. r=ferjm (7ba4294750)
- Bug 1253834 - add AllChildrenIterator::Get(), r=bz (5c1ab2f7f2)
- Bug 1249443 - add AllChildrenIterator::GetPreviousChild, r=bz (812f61db28)
- Bug 1249443 - add AllChildrenIterator::Phase, r=bz (9106ec6dbb)
- Bug 1095236 - Simplify browser_test_new_window_from_content.js to use BrowserTestUtils. r=mrbkap (b8fcea4ad1)
- Bug 1095236 - Test that windows opened from content with dialog=1 still open. r=mrbkap. (db67a80e2b)
- Bug 1210482 - regression tests for 1194897 in which window.[location|menu|personal|status|tool]bar.visible broke for e10s, we're testing these behave appropiately both in content and chrome. r=mconley (a17099181c)
- Bug 1251897 - DocAccessible constructor doesn't have to take root element as an argument, r=davidb (77ef52ac2a)
- Bug 1250294 - Make configure a Python script that invokes the old configure.sh. r=ted (dd95f58e2d)
- bug 1250971 - pass cgthreads with number of cores for Windows PGO builds. r=gps (61057e4e67)
- bug 1249923 - use PogoSafeMode for MSVC PGO. r=gps (baca91346d)
- Bug 1245693. Only set the SSE[2]_FLAGS for x86. r=glandium (45587c6652)
- Bug 1233297 - Part 2b: Remove some unnecessary warning flags. r=glandium (188d1b1a73)
- Bug 1251210 - In configure.py, take AUTOCONF from the environment, if set there. r=ted (eb6256d562)
- Bug 1252041 - rust: disable sse2 code generation on win32. r=mshal (3cce95b050)
- Bug 1252980 - Link the geckolib into libxul and define MOZ_STYLO if --with-servo=PATH is passed. r=gps (97930d9ed3)
2024-02-20 14:48:40 +08:00

44 lines
1.2 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/. */
const {Cu, CC} = require("chrome");
const promise = require("promise");
const Services = require("Services");
const XMLHttpRequest = CC("@mozilla.org/xmlextras/xmlhttprequest;1");
// Downloads and caches a JSON file from a URL given by the pref.
exports.getJSON = function (prefName, bypassCache) {
if (!bypassCache) {
try {
let str = Services.prefs.getCharPref(prefName + "_cache");
let json = JSON.parse(str);
return promise.resolve(json);
} catch(e) {/* no pref or invalid json. Let's continue */}
}
let deferred = promise.defer();
let xhr = new XMLHttpRequest();
xhr.onload = () => {
let json;
try {
json = JSON.parse(xhr.responseText);
} catch(e) {
return deferred.reject("Invalid JSON");
}
Services.prefs.setCharPref(prefName + "_cache", xhr.responseText);
deferred.resolve(json);
}
xhr.onerror = (e) => {
deferred.reject("Network error");
}
xhr.open("get", Services.prefs.getCharPref(prefName));
xhr.send();
return deferred.promise;
}