Merge mozilla-inbound to mozilla-central. a=merge

This commit is contained in:
Dorel Luca 2018-06-04 21:11:34 +03:00
Родитель 8a5e435163 46bd5d1cf4
Коммит 746fbfe0a7
488 изменённых файлов: 4743 добавлений и 2184 удалений

Просмотреть файл

@ -12,6 +12,7 @@ six = "==1.10.0"
attrs = "==18.1.0"
pytest = "==3.2.5"
jsmin = "==2.1.0"
python-hglib = "==2.4"
[requires]
python_version = "2.7"

9
Pipfile.lock сгенерированный
Просмотреть файл

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "706dd858cb4e07dbccf7f3e6f129ac5b50c9906bcd6083e4fb09e9869b379d5e"
"sha256": "695978bb529a1cffb6f329519ce6fe68adbee73d9f05595dbefb2b9d0ebe4177"
},
"pipfile-spec": 6,
"requires": {
@ -61,6 +61,13 @@
"index": "pypi",
"version": "==3.2.5"
},
"python-hglib": {
"hashes": [
"sha256:693d6ed92a6566e78802c7a03c256cda33d08c63ad3f00fcfa11379b184b9462"
],
"index": "pypi",
"version": "==2.4"
},
"six": {
"hashes": [
"sha256:0ff78c403d9bccf5a425a6d31a12aa6b47f1c21ca4dc2573a7e2f32a97335eb1",

Просмотреть файл

@ -78,7 +78,7 @@ ProxyAccessible::RelationByType(RelationType aType) const
if (ProxyAccessible* proxy = mDoc->GetAccessible(targetIDs[i]))
targets.AppendElement(proxy);
return std::move(targets);
return targets;
}
void

Просмотреть файл

@ -759,6 +759,7 @@ BrowserGlue.prototype = {
popup_text: "rgb(249, 249, 250)",
popup_border: "#27272b",
toolbar_field_text: "rgb(249, 249, 250)",
toolbar_field_border: "rgba(249, 249, 250, 0.2)",
author: vendorShortName,
});

Просмотреть файл

@ -1006,7 +1006,7 @@ var gPrivacyPane = {
*/
updateAutoplayMediaControlsVisibility() {
document.getElementById("autoplayMediaBox").hidden =
!Services.prefs.getBoolPref("media.autoplay.enabled.user-gestures-needed");
!Services.prefs.getBoolPref("media.autoplay.enabled.user-gestures-needed", false);
},
/**

Просмотреть файл

@ -1,3 +1,5 @@
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}

Просмотреть файл

@ -299,6 +299,7 @@
@RESPATH@/components/CaptivePortalDetectComponents.manifest
@RESPATH@/components/captivedetect.js
@RESPATH@/components/servicesComponents.manifest
@RESPATH@/components/servicesSettings.manifest
@RESPATH@/components/cryptoComponents.manifest
@RESPATH@/components/TelemetryStartup.js
@RESPATH@/components/TelemetryStartup.manifest

Просмотреть файл

@ -50,7 +50,11 @@
}
:root[lwt-popup-brighttext] {
--panel-separator-color: hsla(0,0%,80%,.25);
--panel-separator-color: rgba(249,249,250,.2);
--arrowpanel-dimmed: rgba(249,249,250,.1);
--arrowpanel-dimmed-further: rgba(249,249,250,.15);
--arrowpanel-dimmed-even-further: rgba(249,249,250,.2);
}
#menubar-items {

Просмотреть файл

@ -41,7 +41,11 @@
}
:root[lwt-popup-brighttext] {
--panel-separator-color: hsla(0,0%,80%,.25);
--panel-separator-color: rgba(249,249,250,.2);
--arrowpanel-dimmed: rgba(249,249,250,.1);
--arrowpanel-dimmed-further: rgba(249,249,250,.15);
--arrowpanel-dimmed-even-further: rgba(249,249,250,.2);
}
#navigator-toolbox {

Просмотреть файл

@ -30,6 +30,11 @@
--lwt-toolbar-field-background-color: rgb(71, 71, 73);
--lwt-toolbar-field-color: var(--chrome-color);
--urlbar-separator-color: #5F6670;
/* !important to override LightweightThemeManager.addBuiltInTheme in
nsBrowserGlue.js */
--autocomplete-popup-background: #2A2A2E !important;
--autocomplete-popup-highlight-background: #0060DF;
}
:root:-moz-lwtheme-darktext {

Просмотреть файл

@ -52,6 +52,10 @@
color: var(--panel-disabled-color);
}
:root[lwt-popup-brighttext] .search-panel-header {
color: var(--autocomplete-popup-color);
}
.search-panel-header > label {
margin-top: 2px !important;
margin-bottom: 1px !important;

Просмотреть файл

@ -72,7 +72,11 @@
}
:root[lwt-popup-brighttext] {
--panel-separator-color: hsla(0,0%,80%,.25);
--panel-separator-color: rgba(249,249,250,.2);
--arrowpanel-dimmed: rgba(249,249,250,.1);
--arrowpanel-dimmed-further: rgba(249,249,250,.15);
--arrowpanel-dimmed-even-further: rgba(249,249,250,.2);
}
#navigator-toolbox:-moz-lwtheme {

Просмотреть файл

@ -86,12 +86,6 @@ check_and_add_gcc_warning('-Wno-inline-new-delete', cxx_compiler)
# too many false positives
check_and_add_gcc_warning('-Wno-error=maybe-uninitialized')
# Turned on by -Wall, but needs changes to be turned into an error
# (bug 1465060).
check_and_add_gcc_warning('-Wno-error=pessimizing-move')
# This one is probably easier, it's only triggered by tests.
check_and_add_gcc_warning('-Wno-error=self-move')
# we don't want our builds held hostage when a platform-specific API
# becomes deprecated.
check_and_add_gcc_warning('-Wno-error=deprecated-declarations')

Просмотреть файл

@ -1,6 +1,6 @@
#!/bin/bash
binutils_version=2.25.1
binutils_version=2.28.1
make_flags='-j12'
root_dir="$1"
@ -14,8 +14,8 @@ if test -z $TMPDIR; then
fi
# Download the source of the specified version of binutils
wget -c --progress=dot:mega -P $TMPDIR ftp://ftp.gnu.org/gnu/binutils/binutils-${binutils_version}.tar.bz2 || exit 1
tar xjf $TMPDIR/binutils-${binutils_version}.tar.bz2
wget -c --progress=dot:mega -P $TMPDIR ftp://ftp.gnu.org/gnu/binutils/binutils-${binutils_version}.tar.xz || exit 1
tar xJf $TMPDIR/binutils-${binutils_version}.tar.xz
# Build binutils
mkdir binutils-objdir

Просмотреть файл

@ -0,0 +1,5 @@
hidden {
local:
# std::thread::_M_start_thread(...)
_ZNSt6thread15_M_start_thread*;
};

Просмотреть файл

@ -23,3 +23,5 @@ COMPILE_FLAGS['CLANG_PLUGIN'] = []
DEFINES['MOZ_LIBSTDCXX_VERSION'] = CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION']
HOST_DEFINES['MOZ_LIBSTDCXX_VERSION'] = CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']
OS_LIBS += ['-Wl,--version-script,%s/hide_std.ld' % SRCDIR]

Просмотреть файл

@ -14,7 +14,7 @@ mozilla.pth:third_party/python/cram
mozilla.pth:third_party/python/dlmanager
mozilla.pth:third_party/python/fluent
mozilla.pth:third_party/python/futures
mozilla.pth:third_party/python/hglib
mozilla.pth:third_party/python/python-hglib
mozilla.pth:third_party/python/jsmin
optional:setup.py:third_party/python/psutil:build_ext:--inplace
mozilla.pth:third_party/python/psutil

Просмотреть файл

@ -185,6 +185,23 @@ class AnimationInspector {
this.animationsCurrentTimeListeners.push(listener);
}
/**
* This function calls AnimationsFront.setCurrentTimes with considering the createdTime
* which was introduced bug 1454392.
*
* @param {Number} currentTime
*/
async doSetCurrentTimes(currentTime) {
const { animations, timeScale } = this.state;
// If currentTime is not defined in timeScale (which happens when connected
// to server older than FF62), set currentTime as it is. See bug 1454392.
currentTime = typeof timeScale.currentTime === "undefined"
? currentTime : currentTime + timeScale.minStartTime;
await this.animationsFront.setCurrentTimes(animations, currentTime, true,
{ relativeToCreatedTime: true });
}
/**
* Return a map of animated property from given animation actor.
*
@ -386,17 +403,11 @@ class AnimationInspector {
return;
}
const { animations, timeScale } = this.state;
const { animations } = this.state;
this.isCurrentTimeSet = true;
// If currentTime is not defined in timeScale (which happens when connected
// to server older than FF62), set currentTime as it is. See bug 1454392.
currentTime =
typeof timeScale.currentTime === "undefined"
? currentTime : currentTime + timeScale.minStartTime;
try {
await this.animationsFront.setCurrentTimes(animations, currentTime, true,
{ relativeToCreatedTime: true });
await this.doSetCurrentTimes(currentTime);
await this.updateAnimations(animations);
} catch (e) {
// Expected if we've already been destroyed or other node have been selected
@ -445,8 +456,7 @@ class AnimationInspector {
try {
if (doPlay && animations.every(animation =>
timeScale.getEndTime(animation) <= animation.state.currentTime)) {
await this.animationsFront.setCurrentTimes(animations, 0, true,
{ relativeToCreatedTime: true });
await this.doSetCurrentTimes(0);
}
// If the server does not support pauseSome/playSome function, (which happens

Просмотреть файл

@ -134,10 +134,24 @@ class AnimationTarget extends Component {
inspectIconTitle: getInspectorStr("inspector.nodePreview.highlightNodeLabel"),
object: translateNodeFrontToGrip(nodeFront),
onDOMNodeClick: () => this.select(),
onDOMNodeMouseOut: () => onHideBoxModelHighlighter(),
onDOMNodeMouseOver: () => this.highlight(),
onDOMNodeMouseOut: () => {
if (!isHighlighted) {
onHideBoxModelHighlighter();
}
},
onDOMNodeMouseOver: () => {
if (!isHighlighted) {
this.highlight();
}
},
onInspectIconClick: (_, e) => {
e.stopPropagation();
if (!isHighlighted) {
// At first, hide highlighter which was created by onDOMNodeMouseOver.
onHideBoxModelHighlighter();
}
setHighlightedNode(isHighlighted ? null : nodeFront);
}
}

Просмотреть файл

@ -36,7 +36,8 @@ support-files =
[browser_animation_current-time-scrubber_each-different-creation-time-animations.js]
[browser_animation_empty_on_invalid_nodes.js]
[browser_animation_inspector_exists.js]
[browser_animation_keyframes-graph_computed-value-path.js]
[browser_animation_keyframes-graph_computed-value-path-01.js]
[browser_animation_keyframes-graph_computed-value-path-02.js]
[browser_animation_keyframes-graph_computed-value-path_easing-hint.js]
skip-if = (os == "win") || (os == "linux") #1461899
[browser_animation_keyframes-graph_keyframe-marker.js]

Просмотреть файл

@ -8,6 +8,7 @@
// * unhighlight when mouse out from the above element
// * lock highlighting when click on the inspect icon in animation target component
// * add 'highlighting' class to animation target component during locking
// * mouseover locked target node
// * unlock highlighting when click on the above icon
// * lock highlighting when click on the other inspect icon
// * if the locked node has multi animations,
@ -16,10 +17,15 @@
add_task(async function() {
await addTab(URL_ROOT + "doc_simple_animation.html");
await removeAnimatedElementsExcept([".animated", ".multi"]);
const { animationInspector, panel, toolbox } = await openAnimationInspector();
const {
animationInspector,
inspector,
panel,
toolbox,
} = await openAnimationInspector();
info("Check highlighting when mouse over on a target node");
let onHighlight = toolbox.once("node-highlight");
const onHighlight = toolbox.once("node-highlight");
mouseOverOnTargetNode(animationInspector, panel, 0);
let nodeFront = await onHighlight;
assertNodeFront(nodeFront, "DIV", "ball animated");
@ -31,9 +37,9 @@ add_task(async function() {
ok(true, "Unhighlighted the targe node");
info("Check node is highlighted when the inspect icon is clicked");
onHighlight = toolbox.once("node-highlight");
let onHighlighterShown = inspector.highlighters.once("box-model-highlighter-shown");
await clickOnInspectIcon(animationInspector, panel, 0);
nodeFront = await onHighlight;
nodeFront = await onHighlighterShown;
assertNodeFront(nodeFront, "DIV", "ball animated");
ok(panel.querySelectorAll(".animation-target")[0].classList.contains("highlighting"),
"The highlighted animation target element should have 'highlighting' class");
@ -44,10 +50,21 @@ add_task(async function() {
ok(panel.querySelectorAll(".animation-target")[0].classList.contains("highlighting"),
"The highlighted element still should have 'highlighting' class");
info("Check no highlight event occur by mouse over locked target");
let highlightEventCount = 0;
const highlightEventCounter = () => {
highlightEventCount += 1;
};
toolbox.on("node-highlight", highlightEventCounter);
mouseOverOnTargetNode(animationInspector, panel, 0);
await wait(500);
is(highlightEventCount, 0, "Highlight event should not occur");
toolbox.off("node-highlight", highlightEventCounter);
info("Highlighting another animation target");
onHighlight = toolbox.once("node-highlight");
onHighlighterShown = inspector.highlighters.once("box-model-highlighter-shown");
await clickOnInspectIcon(animationInspector, panel, 1);
nodeFront = await onHighlight;
nodeFront = await onHighlighterShown;
assertNodeFront(nodeFront, "DIV", "ball multi");
info("Check the highlighted state of the animation targets");
@ -58,6 +75,17 @@ add_task(async function() {
"The animation target[1] should have 'highlighting' class");
ok(animationTargetEls[2].classList.contains("highlighting"),
"The animation target[2] should have 'highlighting' class");
info("Hide highlighter");
const onHighlighterHidden = inspector.highlighters.once("box-model-highlighter-hidden");
await clickOnInspectIcon(animationInspector, panel, 1);
await onHighlighterHidden;
info("Check the highlighted state of the animation targets");
ok(!animationTargetEls[1].classList.contains("highlighting"),
"The animation target[1] should not have 'highlighting' class");
ok(!animationTargetEls[2].classList.contains("highlighting"),
"The animation target[2] should not have 'highlighting' class");
});
function assertNodeFront(nodeFront, tagName, classValue) {

Просмотреть файл

@ -334,130 +334,8 @@ const TEST_DATA = [
},
],
},
{
targetClass: "steps-effect",
properties: [
{
name: "opacity",
computedValuePathClass: "distance-path",
expectedPathSegments: [
{ x: 0, y: 0 },
{ x: 250, y: 25 },
{ x: 500, y: 50 },
{ x: 750, y: 75 },
{ x: 1000, y: 100 },
],
},
],
},
{
targetClass: "frames-keyframe",
properties: [
{
name: "opacity",
computedValuePathClass: "distance-path",
expectedPathSegments: [
{ x: 0, y: 0 },
{ x: 199, y: 0 },
{ x: 200, y: 25 },
{ x: 399, y: 25 },
{ x: 400, y: 50 },
{ x: 599, y: 50 },
{ x: 600, y: 75 },
{ x: 799, y: 75 },
{ x: 800, y: 100 },
{ x: 1000, y: 100 },
],
},
],
},
{
targetClass: "narrow-offsets",
properties: [
{
name: "opacity",
computedValuePathClass: "distance-path",
expectedPathSegments: [
{ x: 0, y: 0 },
{ x: 100, y: 100 },
{ x: 110, y: 100 },
{ x: 114.9, y: 100 },
{ x: 115, y: 50 },
{ x: 129.9, y: 50 },
{ x: 130, y: 0 },
{ x: 1000, y: 100 },
],
},
],
},
{
targetClass: "duplicate-offsets",
properties: [
{
name: "opacity",
computedValuePathClass: "distance-path",
expectedPathSegments: [
{ x: 0, y: 100 },
{ x: 250, y: 100 },
{ x: 499, y: 100 },
{ x: 500, y: 100 },
{ x: 500, y: 0 },
{ x: 750, y: 50 },
{ x: 1000, y: 100 },
],
},
],
},
];
add_task(async function() {
await addTab(URL_ROOT + "doc_multi_keyframes.html");
const { animationInspector, panel } = await openAnimationInspector();
for (const { properties, targetClass } of TEST_DATA) {
info(`Checking keyframes graph for ${ targetClass }`);
await clickOnAnimationByTargetSelector(animationInspector,
panel, `.${ targetClass }`);
for (const property of properties) {
const {
name,
computedValuePathClass,
expectedPathSegments,
expectedStopColors,
} = property;
const testTarget = `${ name } in ${ targetClass }`;
info(`Checking keyframes graph for ${ testTarget }`);
info(`Checking keyframes graph path existence for ${ testTarget }`);
const keyframesGraphPathEl = panel.querySelector(`.${ name }`);
ok(keyframesGraphPathEl,
`The keyframes graph path element of ${ testTarget } should be existence`);
info(`Checking computed value path existence for ${ testTarget }`);
const computedValuePathEl =
keyframesGraphPathEl.querySelector(`.${ computedValuePathClass }`);
ok(computedValuePathEl,
`The computed value path element of ${ testTarget } should be existence`);
info(`Checking path segments for ${ testTarget }`);
const pathEl = computedValuePathEl.querySelector("path");
ok(pathEl, `The <path> element of ${ testTarget } should be existence`);
assertPathSegments(pathEl, true, expectedPathSegments);
if (!expectedStopColors) {
continue;
}
info(`Checking linearGradient for ${ testTarget }`);
const linearGradientEl = computedValuePathEl.querySelector("linearGradient");
ok(linearGradientEl,
`The <linearGradientEl> element of ${ testTarget } should be existence`);
for (const expectedStopColor of expectedStopColors) {
const { offset, color } = expectedStopColor;
assertLinearGradient(linearGradientEl, offset, color);
}
}
}
await testKeyframesGraphComputedValuePath(TEST_DATA);
});

Просмотреть файл

@ -0,0 +1,91 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test for following ComputedValuePath component:
// * element existence
// * path segments
requestLongerTimeout(2);
const TEST_DATA = [
{
targetClass: "steps-effect",
properties: [
{
name: "opacity",
computedValuePathClass: "distance-path",
expectedPathSegments: [
{ x: 0, y: 0 },
{ x: 250, y: 25 },
{ x: 500, y: 50 },
{ x: 750, y: 75 },
{ x: 1000, y: 100 },
],
},
],
},
{
targetClass: "frames-keyframe",
properties: [
{
name: "opacity",
computedValuePathClass: "distance-path",
expectedPathSegments: [
{ x: 0, y: 0 },
{ x: 199, y: 0 },
{ x: 200, y: 25 },
{ x: 399, y: 25 },
{ x: 400, y: 50 },
{ x: 599, y: 50 },
{ x: 600, y: 75 },
{ x: 799, y: 75 },
{ x: 800, y: 100 },
{ x: 1000, y: 100 },
],
},
],
},
{
targetClass: "narrow-offsets",
properties: [
{
name: "opacity",
computedValuePathClass: "distance-path",
expectedPathSegments: [
{ x: 0, y: 0 },
{ x: 100, y: 100 },
{ x: 110, y: 100 },
{ x: 114.9, y: 100 },
{ x: 115, y: 50 },
{ x: 129.9, y: 50 },
{ x: 130, y: 0 },
{ x: 1000, y: 100 },
],
},
],
},
{
targetClass: "duplicate-offsets",
properties: [
{
name: "opacity",
computedValuePathClass: "distance-path",
expectedPathSegments: [
{ x: 0, y: 100 },
{ x: 250, y: 100 },
{ x: 499, y: 100 },
{ x: 500, y: 100 },
{ x: 500, y: 0 },
{ x: 750, y: 50 },
{ x: 1000, y: 100 },
],
},
],
},
];
add_task(async function() {
await testKeyframesGraphComputedValuePath(TEST_DATA);
});

Просмотреть файл

@ -26,10 +26,12 @@ add_task(async function() {
await setClassAttribute(animationInspector, ".animated", "ball still");
info("Make the current time of animation to be over its end time");
await clickOnCurrentTimeScrubberController(animationInspector, panel, 1);
await clickOnPlaybackRateSelector(animationInspector, panel, 10);
info("Resume animations");
await clickOnPauseResumeButton(animationInspector, panel);
assertPlayState(animationInspector.state.animations, ["running", "running"]);
assertCurrentTimeLessThanDuration(animationInspector.state.animations);
assertScrubberPosition(panel);
});
function assertPlayState(animations, expectedState) {
@ -42,6 +44,12 @@ function assertPlayState(animations, expectedState) {
function assertCurrentTimeLessThanDuration(animations) {
animations.forEach((animation, index) => {
ok(animation.state.currentTime < animation.state.duration,
"The current time of animation[${ index }] should be less than its duration");
`The current time of animation[${ index }] should be less than its duration`);
});
}
function assertScrubberPosition(panel) {
const scrubberEl = panel.querySelector(".current-time-scrubber");
const translateX = parseFloat(scrubberEl.style.transform.match(/-?\d+(\.\d+)?/)[0]);
ok(translateX >= 0, "The translateX of scrubber position should be zero or more");
}

Просмотреть файл

@ -761,3 +761,61 @@ function findStopElement(linearGradientEl, offset) {
return null;
}
/**
* Do test for keyframes-graph_computed-value-path-1/2.
*
* @param {Array} testData
*/
async function testKeyframesGraphComputedValuePath(testData) {
await addTab(URL_ROOT + "doc_multi_keyframes.html");
await removeAnimatedElementsExcept(testData.map(t => `.${ t.targetClass }`));
const { animationInspector, panel } = await openAnimationInspector();
for (const { properties, targetClass } of testData) {
info(`Checking keyframes graph for ${ targetClass }`);
await clickOnAnimationByTargetSelector(animationInspector,
panel, `.${ targetClass }`);
for (const property of properties) {
const {
name,
computedValuePathClass,
expectedPathSegments,
expectedStopColors,
} = property;
const testTarget = `${ name } in ${ targetClass }`;
info(`Checking keyframes graph for ${ testTarget }`);
info(`Checking keyframes graph path existence for ${ testTarget }`);
const keyframesGraphPathEl = panel.querySelector(`.${ name }`);
ok(keyframesGraphPathEl,
`The keyframes graph path element of ${ testTarget } should be existence`);
info(`Checking computed value path existence for ${ testTarget }`);
const computedValuePathEl =
keyframesGraphPathEl.querySelector(`.${ computedValuePathClass }`);
ok(computedValuePathEl,
`The computed value path element of ${ testTarget } should be existence`);
info(`Checking path segments for ${ testTarget }`);
const pathEl = computedValuePathEl.querySelector("path");
ok(pathEl, `The <path> element of ${ testTarget } should be existence`);
assertPathSegments(pathEl, true, expectedPathSegments);
if (!expectedStopColors) {
continue;
}
info(`Checking linearGradient for ${ testTarget }`);
const linearGradientEl = computedValuePathEl.querySelector("linearGradient");
ok(linearGradientEl,
`The <linearGradientEl> element of ${ testTarget } should be existence`);
for (const expectedStopColor of expectedStopColors) {
const { offset, color } = expectedStopColor;
assertLinearGradient(linearGradientEl, offset, color);
}
}
}
}

Просмотреть файл

@ -443,6 +443,7 @@ class HighlightersOverlay {
}
this.boxModelHighlighterShown = node;
this.emit("box-model-highlighter-shown", node);
}
/**
@ -454,7 +455,9 @@ class HighlightersOverlay {
}
await this.highlighters.BoxModelHighlighter.hide();
const node = this.boxModelHighlighterShown;
this.boxModelHighlighterShown = null;
this.emit("box-model-highlighter-hidden", node);
}
/**

Просмотреть файл

@ -63,13 +63,13 @@ graphs.memory=MB
# as the legend for each block in every bar. These labels should be kept
# AS SHORT AS POSSIBLE so they don't obstruct important parts of the graph.
category.other=Gecko
category.css=Styles
category.layout=Layout
category.js=JIT
category.gc=GC
category.network=Network
category.graphics=Graphics
category.storage=Storage
category.events=Input & Events
category.dom=DOM
category.idle=Idle
category.tools=Tools
# LOCALIZATION NOTE (table.bytes):

Просмотреть файл

@ -4,7 +4,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
[localization] @AB_CD@.jar:
devtools (en-US/**/*.ftl)
devtools (%*.ftl)
@AB_CD@.jar:
% locale devtools @AB_CD@ %locale/@AB_CD@/devtools/client/

Просмотреть файл

@ -7,16 +7,20 @@ const { L10N } = require("devtools/client/performance/modules/global");
/**
* Details about each label stack frame category.
* @see CATEGORY_MAPPINGS.
* To be kept in sync with the js::ProfilingStackFrame::Category in ProfilingStack.h
*/
const CATEGORIES = [{
color: "#d99b28",
abbrev: "idle",
label: L10N.getStr("category.idle")
}, {
color: "#5e88b0",
abbrev: "other",
label: L10N.getStr("category.other")
}, {
color: "#46afe3",
abbrev: "css",
label: L10N.getStr("category.css")
abbrev: "layout",
label: L10N.getStr("category.layout")
}, {
color: "#d96629",
abbrev: "js",
@ -35,94 +39,35 @@ const CATEGORIES = [{
label: L10N.getStr("category.graphics")
}, {
color: "#8fa1b2",
abbrev: "storage",
label: L10N.getStr("category.storage")
}, {
color: "#d99b28",
abbrev: "events",
label: L10N.getStr("category.events")
abbrev: "dom",
label: L10N.getStr("category.dom")
}, {
// The devtools-only "tools" category which gets computed by
// computeIsContentAndCategory and is not part of the category list in
// ProfilingStack.h.
color: "#8fa1b2",
abbrev: "tools",
label: L10N.getStr("category.tools")
}];
/**
* Mapping from category bitmasks in the profiler data to additional details.
* To be kept in sync with the js::ProfilingStackFrame::Category in ProfilingStack.h
* Get the numeric index for the given category abbreviation.
* See `CATEGORIES` above.
*/
const CATEGORY_MAPPINGS = {
// js::ProfilingStackFrame::Category::OTHER
"16": CATEGORIES[0],
// js::ProfilingStackFrame::Category::CSS
"32": CATEGORIES[1],
// js::ProfilingStackFrame::Category::JS
"64": CATEGORIES[2],
// js::ProfilingStackFrame::Category::GC
"128": CATEGORIES[3],
// js::ProfilingStackFrame::Category::CC
"256": CATEGORIES[3],
// js::ProfilingStackFrame::Category::NETWORK
"512": CATEGORIES[4],
// js::ProfilingStackFrame::Category::GRAPHICS
"1024": CATEGORIES[5],
// js::ProfilingStackFrame::Category::STORAGE
"2048": CATEGORIES[6],
// js::ProfilingStackFrame::Category::EVENTS
"4096": CATEGORIES[7],
// non-bitmasks for specially-assigned categories
"9000": CATEGORIES[8],
};
/**
* Get the numeric bitmask (or set of masks) for the given category
* abbreviation. See `CATEGORIES` and `CATEGORY_MAPPINGS` above.
*
* CATEGORY_MASK can be called with just a name if it is expected that the
* category is mapped to by exactly one bitmask. If the category is mapped
* to by multiple masks, CATEGORY_MASK for that name must be called with
* an additional argument specifying the desired id (in ascending order).
*/
const [CATEGORY_MASK, CATEGORY_MASK_LIST] = (() => {
const bitmasksForCategory = {};
const all = Object.keys(CATEGORY_MAPPINGS);
for (const category of CATEGORIES) {
bitmasksForCategory[category.abbrev] = all
.filter(mask => CATEGORY_MAPPINGS[mask] == category)
.map(mask => +mask)
.sort();
const CATEGORY_INDEX = (() => {
const indexForCategory = {};
for (let categoryIndex = 0; categoryIndex < CATEGORIES.length; categoryIndex++) {
const category = CATEGORIES[categoryIndex];
indexForCategory[category.abbrev] = categoryIndex;
}
return [
function(name, index) {
if (!(name in bitmasksForCategory)) {
throw new Error(`Category abbreviation "${name}" does not exist.`);
}
if (arguments.length == 1) {
if (bitmasksForCategory[name].length != 1) {
throw new Error(`Expected exactly one category number for "${name}".`);
} else {
return bitmasksForCategory[name][0];
}
} else {
if (index > bitmasksForCategory[name].length) {
throw new Error(`Index "${index}" too high for category "${name}".`);
}
return bitmasksForCategory[name][index - 1];
}
},
function(name) {
if (!(name in bitmasksForCategory)) {
throw new Error(`Category abbreviation "${name}" does not exist.`);
}
return bitmasksForCategory[name];
return function(name) {
if (!(name in indexForCategory)) {
throw new Error(`Category abbreviation "${name}" does not exist.`);
}
];
return indexForCategory[name];
};
})();
exports.CATEGORIES = CATEGORIES;
exports.CATEGORY_MAPPINGS = CATEGORY_MAPPINGS;
exports.CATEGORY_MASK = CATEGORY_MASK;
exports.CATEGORY_MASK_LIST = CATEGORY_MASK_LIST;
exports.CATEGORY_INDEX = CATEGORY_INDEX;

Просмотреть файл

@ -9,7 +9,7 @@ const { assert } = require("devtools/shared/DevToolsUtils");
const { isChromeScheme, isContentScheme, isWASM, parseURL } =
require("devtools/client/shared/source-utils");
const { CATEGORY_MASK, CATEGORY_MAPPINGS } = require("devtools/client/performance/modules/categories");
const { CATEGORY_INDEX, CATEGORIES } = require("devtools/client/performance/modules/categories");
// Character codes used in various parsing helper functions.
const CHAR_CODE_R = "r".charCodeAt(0);
@ -190,7 +190,7 @@ function parseLocation(location, fallbackLine, fallbackColumn) {
*/
function computeIsContentAndCategory(frame) {
// Only C++ stack frames have associated category information.
if (frame.category) {
if (frame.category !== null && frame.category !== undefined) {
return;
}
@ -234,18 +234,18 @@ function computeIsContentAndCategory(frame) {
isChromeScheme(location, j) &&
(location.includes("resource://devtools") ||
location.includes("resource://devtools"))) {
frame.category = CATEGORY_MASK("tools");
frame.category = CATEGORY_INDEX("tools");
return;
}
}
}
if (location === "EnterJIT") {
frame.category = CATEGORY_MASK("js");
frame.category = CATEGORY_INDEX("js");
return;
}
frame.category = CATEGORY_MASK("other");
frame.category = CATEGORY_INDEX("other");
}
/**
@ -393,7 +393,10 @@ function getFrameInfo(node, options) {
data.isMetaCategory = node.isMetaCategory;
}
data.samples = node.youngestFrameSamples;
data.categoryData = CATEGORY_MAPPINGS[node.category] || {};
const hasCategory = node.category !== null && node.category !== undefined;
data.categoryData = hasCategory
? (CATEGORIES[node.category] || CATEGORIES[CATEGORY_INDEX("other")])
: {};
data.nodeType = node.nodeType;
// Frame name (function location or some meta information)

Просмотреть файл

@ -124,7 +124,7 @@ add_task(function() {
"The .A.B node's function cell displays the correct line.");
is($fun(".call-tree-host", $$(".call-tree-item")[2]).textContent.trim(), "foo",
"The .A.B node's function cell displays the correct host.");
is($fun(".call-tree-category", $$(".call-tree-item")[2]).textContent.trim(), "Styles",
is($fun(".call-tree-category", $$(".call-tree-item")[2]).textContent.trim(), "Layout",
"The .A.B node's function cell displays the correct category.");
is($$dur(3).textContent.trim(), "5 ms",

Просмотреть файл

@ -9,7 +9,7 @@
const { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
const { CallView } = require("devtools/client/performance/modules/widgets/tree-view");
const { CATEGORY_MASK } = require("devtools/client/performance/modules/categories");
const { CATEGORY_INDEX } = require("devtools/client/performance/modules/categories");
const RecordingUtils = require("devtools/shared/performance/recording-utils");
add_task(function() {
@ -89,20 +89,20 @@ const gProfile = RecordingUtils.deflateProfile({
{ location: "http://content/A" },
{ location: "http://content/E" },
{ location: "http://content/F" },
{ location: "platform_JS", category: CATEGORY_MASK("js") },
{ location: "platform_JS", category: CATEGORY_INDEX("js") },
]
}, {
time: 1 + 1 + 2 + 3,
frames: [
{ location: "(root)" },
{ location: "platform_JS2", category: CATEGORY_MASK("js") },
{ location: "platform_JS2", category: CATEGORY_INDEX("js") },
]
}, {
time: 1 + 1 + 2 + 3 + 5,
frames: [
{ location: "(root)" },
{ location: "http://content/A" },
{ location: "platform_GC", category: CATEGORY_MASK("gc", 1) },
{ location: "platform_GC", category: CATEGORY_INDEX("gc") },
]
}]
}]

Просмотреть файл

@ -6,7 +6,7 @@
* Generates a generalized profile with some samples.
*/
exports.synthesizeProfile = () => {
const { CATEGORY_MASK } = require("devtools/client/performance/modules/categories");
const { CATEGORY_INDEX } = require("devtools/client/performance/modules/categories");
const RecordingUtils = require("devtools/shared/performance/recording-utils");
return RecordingUtils.deflateProfile({
@ -15,34 +15,34 @@ exports.synthesizeProfile = () => {
samples: [{
time: 1,
frames: [
{ category: CATEGORY_MASK("other"), location: "(root)" },
{ category: CATEGORY_MASK("other"), location: "A (http://foo/bar/baz:12)" },
{ category: CATEGORY_MASK("css"), location: "B (http://foo/bar/baz:34)" },
{ category: CATEGORY_MASK("js"), location: "C (http://foo/bar/baz:56)" }
{ category: CATEGORY_INDEX("other"), location: "(root)" },
{ category: CATEGORY_INDEX("other"), location: "A (http://foo/bar/baz:12)" },
{ category: CATEGORY_INDEX("layout"), location: "B (http://foo/bar/baz:34)" },
{ category: CATEGORY_INDEX("js"), location: "C (http://foo/bar/baz:56)" }
]
}, {
time: 1 + 1,
frames: [
{ category: CATEGORY_MASK("other"), location: "(root)" },
{ category: CATEGORY_MASK("other"), location: "A (http://foo/bar/baz:12)" },
{ category: CATEGORY_MASK("css"), location: "B (http://foo/bar/baz:34)" },
{ category: CATEGORY_MASK("gc", 1), location: "D (http://foo/bar/baz:78:9)" }
{ category: CATEGORY_INDEX("other"), location: "(root)" },
{ category: CATEGORY_INDEX("other"), location: "A (http://foo/bar/baz:12)" },
{ category: CATEGORY_INDEX("layout"), location: "B (http://foo/bar/baz:34)" },
{ category: CATEGORY_INDEX("gc"), location: "D (http://foo/bar/baz:78:9)" }
]
}, {
time: 1 + 1 + 2,
frames: [
{ category: CATEGORY_MASK("other"), location: "(root)" },
{ category: CATEGORY_MASK("other"), location: "A (http://foo/bar/baz:12)" },
{ category: CATEGORY_MASK("css"), location: "B (http://foo/bar/baz:34)" },
{ category: CATEGORY_MASK("gc", 1), location: "D (http://foo/bar/baz:78:9)" }
{ category: CATEGORY_INDEX("other"), location: "(root)" },
{ category: CATEGORY_INDEX("other"), location: "A (http://foo/bar/baz:12)" },
{ category: CATEGORY_INDEX("layout"), location: "B (http://foo/bar/baz:34)" },
{ category: CATEGORY_INDEX("gc"), location: "D (http://foo/bar/baz:78:9)" }
]
}, {
time: 1 + 1 + 2 + 3,
frames: [
{ category: CATEGORY_MASK("other"), location: "(root)" },
{ category: CATEGORY_MASK("other"), location: "A (http://foo/bar/baz:12)" },
{ category: CATEGORY_MASK("gc", 2), location: "E (http://foo/bar/baz:90)" },
{ category: CATEGORY_MASK("network"), location: "F (http://foo/bar/baz:99)" }
{ category: CATEGORY_INDEX("other"), location: "(root)" },
{ category: CATEGORY_INDEX("other"), location: "A (http://foo/bar/baz:12)" },
{ category: CATEGORY_INDEX("gc"), location: "E (http://foo/bar/baz:90)" },
{ category: CATEGORY_INDEX("network"), location: "F (http://foo/bar/baz:99)" }
]
}]
}]

Просмотреть файл

@ -7,7 +7,7 @@
*/
add_task(function() {
const { CATEGORIES, CATEGORY_MAPPINGS } = require("devtools/client/performance/modules/categories");
const { CATEGORIES } = require("devtools/client/performance/modules/categories");
const { L10N } = require("devtools/client/performance/modules/global");
const count = CATEGORIES.length;
@ -22,12 +22,4 @@ add_task(function() {
ok(CATEGORIES.every(e => e.label === L10N.getStr("category." + e.abbrev)),
"All categories have a correctly localized label.");
ok(Object.keys(CATEGORY_MAPPINGS).every(e => (Number(e) >= 9000 && Number(e) <= 9999) ||
Number.isInteger(Math.log2(e))),
"All bitmask mappings keys are powers of 2, or between 9000-9999 for special " +
"categories.");
ok(Object.keys(CATEGORY_MAPPINGS).every(e => CATEGORIES.includes(CATEGORY_MAPPINGS[e])),
"All bitmask mappings point to a category.");
});

Просмотреть файл

@ -6,7 +6,7 @@
* Tests that when displaying only content nodes, platform nodes are generalized.
*/
var { CATEGORY_MASK } = require("devtools/client/performance/modules/categories");
var { CATEGORY_INDEX } = require("devtools/client/performance/modules/categories");
add_task(function test() {
const { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
@ -35,22 +35,29 @@ add_task(function test() {
equal(root.calls.length, 2, "root has 2 children");
ok(getFrameNodePath(root, url("A")), "root has content child");
ok(getFrameNodePath(root, "64"), "root has platform generalized child");
equal(getFrameNodePath(root, "64").calls.length, 0,
ok(getFrameNodePath(root, `${CATEGORY_INDEX("js")}`),
"root has platform generalized child");
equal(getFrameNodePath(root, `${CATEGORY_INDEX("js")}`).calls.length, 0,
"platform generalized child is a leaf.");
ok(getFrameNodePath(root, `${url("A")} > 128`),
ok(getFrameNodePath(root, `${url("A")} > ${CATEGORY_INDEX("gc")}`),
"A has platform generalized child of another type");
equal(getFrameNodePath(root, `${url("A")} > 128`).calls.length, 0,
equal(getFrameNodePath(root, `${url("A")} > ${CATEGORY_INDEX("gc")}`).calls.length, 0,
"second generalized type is a leaf.");
ok(getFrameNodePath(root, `${url("A")} > ${url("E")} > ${url("F")} > 64`),
ok(getFrameNodePath(
root,
`${url("A")} > ${url("E")} > ${url("F")} > ${CATEGORY_INDEX("js")}`
),
"a second leaf of the first generalized type exists deep in the tree.");
ok(getFrameNodePath(root, `${url("A")} > 128`),
ok(getFrameNodePath(root, `${url("A")} > ${CATEGORY_INDEX("gc")}`),
"A has platform generalized child of another type");
equal(getFrameNodePath(root, "64").category,
getFrameNodePath(root, `${url("A")} > ${url("E")} > ${url("F")} > 64`).category,
equal(getFrameNodePath(root, `${CATEGORY_INDEX("js")}`).category,
getFrameNodePath(
root,
`${url("A")} > ${url("E")} > ${url("F")} > ${CATEGORY_INDEX("js")}`
).category,
"generalized frames of same type are duplicated in top-down view");
});
@ -68,7 +75,7 @@ var gThread = synthesizeProfileForTest([{
{ location: "(root)" },
{ location: "http://content/A" },
{ location: "http://content/B" },
{ location: "contentY", category: CATEGORY_MASK("css") },
{ location: "contentY", category: CATEGORY_INDEX("layout") },
{ location: "http://content/D" }
]
}, {
@ -76,22 +83,22 @@ var gThread = synthesizeProfileForTest([{
frames: [
{ location: "(root)" },
{ location: "http://content/A" },
{ location: "contentY", category: CATEGORY_MASK("css") },
{ location: "contentY", category: CATEGORY_INDEX("layout") },
{ location: "http://content/E" },
{ location: "http://content/F" },
{ location: "contentY", category: CATEGORY_MASK("js") },
{ location: "contentY", category: CATEGORY_INDEX("js") },
]
}, {
time: 5 + 20,
frames: [
{ location: "(root)" },
{ location: "contentX", category: CATEGORY_MASK("js") },
{ location: "contentX", category: CATEGORY_INDEX("js") },
]
}, {
time: 5 + 25,
frames: [
{ location: "(root)" },
{ location: "http://content/A" },
{ location: "contentZ", category: CATEGORY_MASK("gc", 1) },
{ location: "contentZ", category: CATEGORY_INDEX("gc") },
]
}]);

Просмотреть файл

@ -9,7 +9,7 @@
add_task(function test() {
const FrameUtils = require("devtools/client/performance/modules/logic/frame-utils");
const { FrameNode } = require("devtools/client/performance/modules/logic/tree-model");
const { CATEGORY_MASK } = require("devtools/client/performance/modules/categories");
const { CATEGORY_INDEX } = require("devtools/client/performance/modules/categories");
const compute = frame => {
FrameUtils.computeIsContentAndCategory(frame);
return frame;
@ -39,7 +39,7 @@ add_task(function test() {
new FrameNode("Foo::Bar::Baz", compute({
location: "Foo::Bar::Baz",
line: 456,
category: CATEGORY_MASK("other"),
category: CATEGORY_INDEX("other"),
}), false),
new FrameNode("EnterJIT", compute({
location: "EnterJIT",

Просмотреть файл

@ -6,6 +6,8 @@
* Tests that when displaying only content nodes, platform nodes are generalized.
*/
var { CATEGORY_INDEX } = require("devtools/client/performance/modules/categories");
add_task(function test() {
const { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
const url = (n) => `http://content/${n}`;
@ -32,16 +34,19 @@ add_task(function test() {
equal(root.calls.length, 2, "root has 2 children");
ok(getFrameNodePath(root, url("A")), "root has content child");
ok(getFrameNodePath(root, "9000"),
ok(getFrameNodePath(root, `${CATEGORY_INDEX("tools")}`),
"root has platform generalized child from Chrome JS");
equal(getFrameNodePath(root, "9000").calls.length, 0,
equal(getFrameNodePath(root, `${CATEGORY_INDEX("tools")}`).calls.length, 0,
"platform generalized child is a leaf.");
ok(getFrameNodePath(root, `${url("A")} > ${url("E")} > ${url("F")} > 9000`),
ok(getFrameNodePath(root,
`${url("A")} > ${url("E")} > ${url("F")} > ${CATEGORY_INDEX("tools")}`),
"a second leaf of the generalized Chrome JS exists.");
equal(getFrameNodePath(root, "9000").category,
getFrameNodePath(root, `${url("A")} > ${url("E")} > ${url("F")} > 9000`).category,
equal(getFrameNodePath(root, `${CATEGORY_INDEX("tools")}`).category,
getFrameNodePath(root,
`${url("A")} > ${url("E")} > ${url("F")} > ${CATEGORY_INDEX("tools")}`
).category,
"generalized frames of same type are duplicated in top-down view");
});

Просмотреть файл

@ -29,7 +29,7 @@ function test() {
const target = TargetFactory.forTab(gBrowser.selectedTab);
gDevTools.showToolbox(target, "webconsole").then((toolbox) => {
const hud = toolbox.getCurrentPanel().hud;
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
testFocus(sw, hud);
});
});

Просмотреть файл

@ -22,7 +22,6 @@ JSTerm.prototype = {
},
openVariablesView() { },
clearOutput() { },
init() {
this.doc = this.hud.window.document;

Просмотреть файл

@ -13,7 +13,9 @@ loader.lazyRequireGetter(this, "EventEmitter",
loader.lazyRequireGetter(this, "getColor",
"devtools/client/shared/theme", true);
loader.lazyRequireGetter(this, "CATEGORY_MAPPINGS",
loader.lazyRequireGetter(this, "CATEGORIES",
"devtools/client/performance/modules/categories", true);
loader.lazyRequireGetter(this, "CATEGORY_INDEX",
"devtools/client/performance/modules/categories", true);
loader.lazyRequireGetter(this, "FrameUtils",
"devtools/client/performance/modules/logic/frame-utils");
@ -1292,7 +1294,8 @@ var FlameGraphUtils = {
if (frameKey !== "" && frameKey !== "(root)") {
// If the frame is a meta category, use the category label.
if (mutableFrameKeyOptions.isMetaCategoryOut) {
frameKey = CATEGORY_MAPPINGS[frameKey].label;
const category = CATEGORIES[frameKey] || CATEGORIES[CATEGORY_INDEX("other")];
frameKey = category.label;
}
sampleFrames[stackDepth] = inflatedFrame;

Просмотреть файл

@ -288,7 +288,7 @@ class JSTerm extends Component {
if (helperResult && helperResult.type) {
switch (helperResult.type) {
case "clearOutput":
this.clearOutput();
this.hud.clearOutput();
break;
case "clearHistory":
this.props.clearHistory();
@ -484,40 +484,6 @@ class JSTerm extends Component {
return grip ? grip.actor : null;
}
/**
* Clear the Web Console output.
*
* This method emits the "messages-cleared" notification.
*
* @param boolean clearStorage
* True if you want to clear the console messages storage associated to
* this Web Console.
*/
clearOutput(clearStorage) {
if (this.hud && this.hud.consoleOutput) {
this.hud.consoleOutput.dispatchMessagesClear();
}
this.webConsoleClient.clearNetworkRequests();
if (clearStorage) {
this.webConsoleClient.clearMessagesCache();
}
this.focus();
this.emit("messages-cleared");
}
/**
* Remove all of the private messages from the Web Console output.
*
* This method emits the "private-messages-cleared" notification.
*/
clearPrivateMessages() {
if (this.hud && this.hud.consoleOutput) {
this.hud.consoleOutput.dispatchPrivateMessagesClear();
this.emit("private-messages-cleared");
}
}
/**
* Updates the size of the input field (command line) to fit its contents.
*

Просмотреть файл

@ -73,8 +73,8 @@ exports.items = [
return null;
}
const onceMessagesCleared = panel.hud.jsterm.once("messages-cleared");
panel.hud.jsterm.clearOutput();
const onceMessagesCleared = panel.hud.once("messages-cleared");
panel.hud.ui.clearOutput();
return onceMessagesCleared;
}
},

Просмотреть файл

@ -44,7 +44,7 @@ add_task(async function() {
});
async function testMessages(hud) {
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
expectUncaughtException();

Просмотреть файл

@ -19,7 +19,7 @@ add_task(async function testCategoryLogs() {
await checkMessageExists(hud, "bug861338-log-cached");
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
function testTrace() {
console.trace();
@ -48,7 +48,7 @@ add_task(async function testCategoryLogs() {
await checkMessageExists(hud, "console.trace()");
await checkMessageExists(hud, "foobarTimer");
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
await HUDService.toggleBrowserConsole();
});
@ -79,7 +79,7 @@ add_task(async function testFilter() {
await checkMessageHidden(hud, shouldBeHidden);
await resetFilters(hud);
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
await HUDService.toggleBrowserConsole();
});

Просмотреть файл

@ -85,7 +85,7 @@ add_task(async function() {
ok(true, "Messages are displayed as expected");
info("close the private window and check if private messages are removed");
const onPrivateMessagesCleared = hud.jsterm.once("private-messages-cleared");
const onPrivateMessagesCleared = hud.ui.once("private-messages-cleared");
privateWindow.BrowserTryToCloseWindow();
await onPrivateMessagesCleared;

Просмотреть файл

@ -10,7 +10,7 @@
const TEST_URI = "data:text/html;charset=utf8,<p>test code completion";
add_task(async function() {
const {jsterm} = await openNewTabAndConsole(TEST_URI);
const {jsterm, ui} = await openNewTabAndConsole(TEST_URI);
const input = jsterm.inputNode;
// Test typing 'docu'.
@ -50,7 +50,7 @@ add_task(async function() {
is(jsterm.completeNode.value, " entsByTagNameNS",
"'document.getElem' completion");
jsterm.clearOutput();
ui.clearOutput();
await jstermSetValueAndComplete(jsterm, "docu");
is(jsterm.completeNode.value, " ment", "'docu' completion");

Просмотреть файл

@ -18,13 +18,13 @@ add_task(async function() {
});
async function test$(hud) {
hud.jsterm.clearOutput();
hud.ui.clearOutput();
const msg = await hud.jsterm.execute("$(document.body)");
ok(msg.textContent.includes("<p>"), "jsterm output is correct for $()");
}
async function test$$(hud) {
hud.jsterm.clearOutput();
hud.ui.clearOutput();
hud.jsterm.setInputValue();
const msg = await hud.jsterm.execute("$$(document)");
ok(msg.textContent.includes("621644"), "jsterm output is correct for $$()");

Просмотреть файл

@ -22,7 +22,7 @@ add_task(async function() {
for (const [errorMessageName, expression] of Object.entries(ErrorDocStatements)) {
const title = ErrorDocs.GetURL({ errorMessageName }).split("?")[0];
jsterm.clearOutput();
hud.ui.clearOutput();
const onMessage = waitForMessage(hud, "RangeError:");
jsterm.execute(expression);
const {node} = await onMessage;

Просмотреть файл

@ -18,7 +18,7 @@ add_task(async function() {
}
};
jsterm.clearOutput();
hud.ui.clearOutput();
await jsterm.execute("help()");
await jsterm.execute("help");
await jsterm.execute("?");

Просмотреть файл

@ -65,7 +65,7 @@ async function getObjectInspector(hud) {
// Filter out other messages to ensure ours stays visible.
ui.filterBox.value = "browser_console_hide_jsterm_test";
jsterm.clearOutput();
hud.ui.clearOutput();
jsterm.execute("new Object({ browser_console_hide_jsterm_test: true })");
const message = await waitFor(

Просмотреть файл

@ -16,9 +16,9 @@ const {
} = require("devtools/client/webconsole/constants");
add_task(async function() {
const { jsterm } = await openNewTabAndConsole(TEST_URI);
const { jsterm, ui } = await openNewTabAndConsole(TEST_URI);
const { inputNode } = jsterm;
jsterm.clearOutput();
ui.clearOutput();
for (const command of COMMANDS) {
info(`Executing command ${command}`);

Просмотреть файл

@ -19,8 +19,8 @@ const stringToCopy = "foobazbarBug642615";
add_task(async function() {
await pushPref("devtools.selfxss.count", 0);
const {jsterm} = await openNewTabAndConsole(TEST_URI);
jsterm.clearOutput();
const {jsterm, ui} = await openNewTabAndConsole(TEST_URI);
ui.clearOutput();
ok(!jsterm.completeNode.value, "no completeNode.value");
jsterm.setInputValue("doc");

Просмотреть файл

@ -67,5 +67,5 @@ async function executeWindowTest(hud, iframeRole) {
ok(messages, `Expected evaluation result messages are shown in ${iframeRole} iframe`);
// Clear the output so we don't pollute the next assertions.
hud.jsterm.clearOutput();
hud.ui.clearOutput();
}

Просмотреть файл

@ -20,7 +20,7 @@ add_task(async function() {
"log from SharedWorker is displayed as expected"
);
const onMessagesCleared = hud.jsterm.once("messages-cleared");
hud.jsterm.clearOutput(true);
const onMessagesCleared = hud.ui.once("messages-cleared");
hud.ui.clearOutput(true);
await onMessagesCleared;
});

Просмотреть файл

@ -35,7 +35,7 @@ add_task(async function() {
await onPrefUpdated;
const hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
info("Call the log function defined in the test page");
await ContentTask.spawn(gBrowser.selectedBrowser, null, () => {

Просмотреть файл

@ -18,7 +18,7 @@ add_task(async function() {
await pushPref("devtools.webconsole.filter.net", true);
const hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
info("Test Copy URL menu item for text log");
@ -36,7 +36,7 @@ add_task(async function() {
ok(!copyURLItem, "Copy URL menu item is hidden for a simple text message");
await hideContextMenu(hud);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
info("Test Copy URL menu item for network log");

Просмотреть файл

@ -16,7 +16,7 @@ add_task(async function() {
await pushPref("devtools.webconsole.filter.net", true);
const hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
info("Test Open URL menu item for text log");
@ -33,7 +33,7 @@ add_task(async function() {
ok(!openUrlItem, "Open URL menu item is not available");
await hideContextMenu(hud);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
info("Test Open URL menu item for network log");

Просмотреть файл

@ -17,7 +17,7 @@ const CSP_VIOLATION_MSG = "Content Security Policy: The page\u2019s settings " +
add_task(async function() {
const hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
const onRepeatedMessage = waitForRepeatedMessage(hud, CSP_VIOLATION_MSG, 2);
await loadDocument(TEST_VIOLATION);

Просмотреть файл

@ -40,5 +40,5 @@ add_task(async function() {
await onCspReportMessage;
ok(true, "Confirmed that CSP and CSP-Report-Only log different messages to console");
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
});

Просмотреть файл

@ -13,7 +13,7 @@ const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
add_task(async function() {
const hud = await openNewTabAndConsole(TEST_URI);
const {jsterm} = hud;
jsterm.clearOutput();
hud.ui.clearOutput();
const onInputMessage = waitForMessage(hud, "window.location.href;", ".message.command");
const onEvaluationResultMessage = waitForMessage(hud, TEST_URI, ".message.result");

Просмотреть файл

@ -33,7 +33,7 @@ add_task(async function() {
const { browser } = await loadTab("about:blank", remoteType);
hud = await openConsole();
hud.jsterm.clearOutput();
hud.ui.clearOutput();
const loaded = loadBrowser(browser);
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, uri.spec);

Просмотреть файл

@ -48,14 +48,14 @@ add_task(async function() {
const hud = await openConsole();
const {jsterm} = hud;
jsterm.clearOutput();
hud.ui.clearOutput();
const onEvaluationResult = waitForMessage(hud, "<h1>");
jsterm.execute("$0");
await onEvaluationResult;
ok(true, "correct output for $0");
jsterm.clearOutput();
hud.ui.clearOutput();
const newH1Content = "newH1Content";
const onAssignmentResult = waitForMessage(hud, "<h1>");

Просмотреть файл

@ -92,7 +92,7 @@ add_task(async function() {
});
async function navigateAndCheckForWarningMessage({name, text, url}, hud) {
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
const onMessage = waitForMessage(hud, text, ".message.warning");
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, url);

Просмотреть файл

@ -58,7 +58,7 @@ add_task(async function() {
});
async function navigateAndCheckWarningMessage({url, name, text}, hud) {
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
const onMessage = waitForMessage(hud, text, ".message.warning");
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, url);

Просмотреть файл

@ -20,7 +20,7 @@ add_task(async function() {
info("Focus after console is opened");
ok(hasFocus(inputNode), "input node is focused after console is opened");
hud.jsterm.clearOutput();
hud.ui.clearOutput();
ok(hasFocus(inputNode), "input node is focused after output is cleared");
info("Focus during message logging");

Просмотреть файл

@ -11,8 +11,8 @@ const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/mochitest/test-console.html";
add_task(async function() {
const { jsterm } = await openNewTabAndConsole(TEST_URI);
jsterm.clearOutput();
const { jsterm, ui } = await openNewTabAndConsole(TEST_URI);
ui.clearOutput();
const { inputNode } = jsterm;
const getInputHeight = () => inputNode.clientHeight;

Просмотреть файл

@ -13,7 +13,7 @@ const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
add_task(async function() {
await pushPref("devtools.hud.loglimit", 140);
const hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
let onMessage = waitForMessage(hud, "test message [149]");
ContentTask.spawn(gBrowser.selectedBrowser, {}, async function() {

Просмотреть файл

@ -104,7 +104,7 @@ async function openRequestAfterUpdates(target, hud) {
async function openRequestBeforeUpdates(target, hud, tab) {
const toolbox = gDevTools.getToolbox(target);
hud.jsterm.clearOutput(true);
hud.ui.clearOutput(true);
const xhrUrl = TEST_PATH + "sjs_slow-response-test-server.sjs";
const message = waitForMessage(hud, xhrUrl);

Просмотреть файл

@ -13,7 +13,7 @@ const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
add_task(async function() {
const hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
const messages = ["console.log('foo', 'bar');", "foo bar", "undefined"];
const onMessages = waitForMessages({

Просмотреть файл

@ -20,7 +20,7 @@ add_task(async function() {
expectUncaughtExceptionNoE10s();
let hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
expectUncaughtExceptionNoE10s();
await refreshTab();

Просмотреть файл

@ -46,7 +46,7 @@ add_task(async function() {
],
});
hud.jsterm.clearOutput();
hud.ui.clearOutput();
hud.jsterm.execute("window.location.href");
info("wait for window.location.href after page navigation");
@ -57,7 +57,7 @@ add_task(async function() {
// Navigation clears messages. Wait for that clear to happen before
// continuing the test or it might destroy messages we wait later on (Bug
// 1270234).
const cleared = hud.jsterm.once("messages-cleared");
const cleared = hud.ui.once("messages-cleared");
gBrowser.goBack();

Просмотреть файл

@ -66,5 +66,5 @@ async function testScriptError(hud, testData) {
ok(hrefs.has(url), `Expected a link to ${url}.`);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
}

Просмотреть файл

@ -23,7 +23,7 @@ async function testSelectionWhenMovingBetweenBoxes(hud) {
const jsterm = hud.jsterm;
// Fill the console with some output.
jsterm.clearOutput();
hud.ui.clearOutput();
await jsterm.execute("1 + 2");
await waitFor(() => findMessage(hud, "3"));
await jsterm.execute("3 + 4");

Просмотреть файл

@ -15,7 +15,7 @@ const SAMPLE_MSG = "specified a header that could not be parsed successfully.";
add_task(async function() {
const hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
hud.ui.clearOutput();
await loadDocument(TEST_DOC);
await waitFor(() => findMessage(hud, SAMPLE_MSG, ".message.warn"));

Просмотреть файл

@ -55,7 +55,7 @@ add_task(async function() {
is(findMessage(hud2, "bTimer started"), null, "No message is printed to "
+ "the console when the timer starts");
hud2.jsterm.clearOutput();
hud2.ui.clearOutput();
// Calling console.time('bTimer') on a page, then navigating to another page
// and calling console.timeEnd('bTimer') on the new console front-end should

Просмотреть файл

@ -46,7 +46,7 @@ registerCleanupFunction(async function() {
const browserConsole = HUDService.getBrowserConsole();
if (browserConsole) {
if (browserConsole.jsterm) {
browserConsole.jsterm.clearOutput(true);
browserConsole.jsterm.hud.clearOutput(true);
}
await HUDService.toggleBrowserConsole();
}

Просмотреть файл

@ -387,7 +387,7 @@ WebConsoleConnectionProxy.prototype = {
*/
_onLastPrivateContextExited: function(type, packet) {
if (this.webConsoleFrame && packet.from == this._consoleActor) {
this.webConsoleFrame.jsterm.clearPrivateMessages();
this.webConsoleFrame.clearPrivateMessages();
}
},

Просмотреть файл

@ -123,6 +123,39 @@ WebConsoleFrame.prototype = {
return this._destroyer.promise;
},
/**
* Clear the Web Console output.
*
* This method emits the "messages-cleared" notification.
*
* @param boolean clearStorage
* True if you want to clear the console messages storage associated to
* this Web Console.
*/
clearOutput(clearStorage) {
if (this.consoleOutput) {
this.consoleOutput.dispatchMessagesClear();
}
this.webConsoleClient.clearNetworkRequests();
if (clearStorage) {
this.webConsoleClient.clearMessagesCache();
}
this.jsterm.focus();
this.emit("messages-cleared");
},
/**
* Remove all of the private messages from the Web Console output.
*
* This method emits the "private-messages-cleared" notification.
*/
clearPrivateMessages() {
if (this.consoleOutput) {
this.consoleOutput.dispatchPrivateMessagesClear();
this.emit("private-messages-cleared");
}
},
_onUpdateListeners() {
},
@ -238,7 +271,7 @@ WebConsoleFrame.prototype = {
clearShortcut = l10n.getStr("webconsole.clear.key");
}
shortcuts.on(clearShortcut, () => this.jsterm.clearOutput(true));
shortcuts.on(clearShortcut, () => this.clearOutput(true));
if (this.isBrowserConsole) {
// Make sure keyboard shortcuts work immediately after opening
@ -338,7 +371,7 @@ WebConsoleFrame.prototype = {
packet._type = true;
this.consoleOutput.dispatchMessageAdd(packet);
} else {
this.jsterm.clearOutput(false);
this.clearOutput(false);
}
if (packet.url) {

Просмотреть файл

@ -87,8 +87,8 @@ class DeserializedEdgeRange : public EdgeRange
auto& edge = node->edges[i];
auto referent = node->getEdgeReferent(edge);
currentEdge = std::move(Edge(edge.name ? NS_strdup(edge.name) : nullptr,
referent));
currentEdge = Edge(edge.name
? NS_strdup(edge.name) : nullptr, referent);
front_ = &currentEdge;
}

Просмотреть файл

@ -2865,7 +2865,7 @@ nsDocShell::GetInitialClientInfo() const
if (mInitialClientSource) {
Maybe<ClientInfo> result;
result.emplace(mInitialClientSource->Info());
return std::move(result);
return result;
}
nsGlobalWindowInner* innerWindow =
@ -14067,10 +14067,10 @@ nsDocShell::NotifyJSRunToCompletionStart(const char* aReason,
if (mJSRunToCompletionDepth == 0) {
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
if (timelines && timelines->HasConsumer(this)) {
timelines->AddMarkerForDocShell(this, std::move(
timelines->AddMarkerForDocShell(this,
mozilla::MakeUnique<JavascriptTimelineMarker>(
aReason, aFunctionName, aFilename, aLineNumber, MarkerTracingType::START,
aAsyncStack, aAsyncCause)));
aAsyncStack, aAsyncCause));
}
}

Просмотреть файл

@ -32,10 +32,10 @@ AutoRestyleTimelineMarker::AutoRestyleTimelineMarker(
}
mDocShell = aDocShell;
timelines->AddMarkerForDocShell(mDocShell, std::move(
timelines->AddMarkerForDocShell(mDocShell,
MakeUnique<RestyleTimelineMarker>(
mIsAnimationOnly,
MarkerTracingType::START)));
MarkerTracingType::START));
}
AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker()
@ -51,10 +51,10 @@ AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker()
return;
}
timelines->AddMarkerForDocShell(mDocShell, std::move(
timelines->AddMarkerForDocShell(mDocShell,
MakeUnique<RestyleTimelineMarker>(
mIsAnimationOnly,
MarkerTracingType::END)));
MarkerTracingType::END));
}
} // namespace mozilla

Просмотреть файл

@ -185,7 +185,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
{
MOZ_ASSERT(NS_IsMainThread());
if (HasConsumer(aDocShell)) {
aDocShell->mObserved->AddMarker(std::move(MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest)));
aDocShell->mObserved->AddMarker(MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest));
}
}
@ -198,7 +198,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
{
MOZ_ASSERT(NS_IsMainThread());
if (HasConsumer(aDocShell)) {
aDocShell->mObserved->AddMarker(std::move(MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest)));
aDocShell->mObserved->AddMarker(MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest));
}
}

Просмотреть файл

@ -90,7 +90,7 @@ public:
public:
explicit Iterator(EffectSet& aEffectSet)
: mEffectSet(aEffectSet)
, mHashIterator(std::move(aEffectSet.mEffects.Iter()))
, mHashIterator(aEffectSet.mEffects.Iter())
, mIsEndIterator(false)
{
#ifdef DEBUG

Просмотреть файл

@ -296,6 +296,10 @@ public:
bool
Parse()
{
if (mData.IsEmpty()) {
return false;
}
// Determine boundary from mimetype.
const char* boundaryId = nullptr;
boundaryId = strstr(mMimeType.BeginWriting(), "boundary");
@ -387,7 +391,7 @@ public:
}
}
NS_NOTREACHED("Should never reach here.");
MOZ_ASSERT_UNREACHABLE("Should never reach here.");
return false;
}

Просмотреть файл

@ -493,7 +493,7 @@ CustomElementRegistry::CreateCustomElementCallback(
if (aAdoptedCallbackArgs) {
callback->SetAdoptedCallbackArgs(*aAdoptedCallbackArgs);
}
return std::move(callback);
return callback;
}
/* static */ void

Просмотреть файл

@ -432,7 +432,7 @@ nsContentPermissionUtils::GetContentPermissionRequestParentById(const TabId& aTa
}
}
return std::move(parentArray);
return parentArray;
}
/* static */ void
@ -455,7 +455,7 @@ nsContentPermissionUtils::GetContentPermissionRequestChildById(const TabId& aTab
}
}
return std::move(childArray);
return childArray;
}
/* static */ void

Просмотреть файл

@ -1235,6 +1235,9 @@ nsContentSink::ScrollToRef()
void
nsContentSink::StartLayout(bool aIgnorePendingSheets)
{
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("nsContentSink::StartLayout", LAYOUT,
mDocumentURI->GetSpecOrDefault());
if (mLayoutStarted) {
// Nothing to do here
return;

Просмотреть файл

@ -136,6 +136,18 @@ nsDOMDataChannel::Reliable() const
return mDataChannel->GetType() == mozilla::DataChannelConnection::RELIABLE;
}
mozilla::dom::Nullable<uint16_t>
nsDOMDataChannel::GetMaxPacketLifeTime() const
{
return mDataChannel->GetMaxPacketLifeTime();
}
mozilla::dom::Nullable<uint16_t>
nsDOMDataChannel::GetMaxRetransmits() const
{
return mDataChannel->GetMaxRetransmits();
}
bool
nsDOMDataChannel::Ordered() const
{

Просмотреть файл

@ -55,6 +55,8 @@ public:
void GetLabel(nsAString& aLabel);
void GetProtocol(nsAString& aProtocol);
bool Reliable() const;
mozilla::dom::Nullable<uint16_t> GetMaxPacketLifeTime() const;
mozilla::dom::Nullable<uint16_t> GetMaxRetransmits() const;
mozilla::dom::RTCDataChannelState ReadyState() const;
uint32_t BufferedAmount() const;
uint32_t BufferedAmountLowThreshold() const;

Просмотреть файл

@ -720,7 +720,7 @@ nsDOMWindowUtils::SendMouseEventToWindow(const nsAString& aType,
uint32_t aIdentifier,
uint8_t aOptionalArgCount)
{
AUTO_PROFILER_LABEL("nsDOMWindowUtils::SendMouseEventToWindow", EVENTS);
AUTO_PROFILER_LABEL("nsDOMWindowUtils::SendMouseEventToWindow", OTHER);
return SendMouseEventCommon(aType, aX, aY, aButton, aClickCount, aModifiers,
aIgnoreRootScrollFrame, aPressure,
@ -1239,7 +1239,7 @@ nsDOMWindowUtils::GetWidgetForElement(Element* aElement)
NS_IMETHODIMP
nsDOMWindowUtils::GarbageCollect(nsICycleCollectorListener *aListener)
{
AUTO_PROFILER_LABEL("nsDOMWindowUtils::GarbageCollect", GC);
AUTO_PROFILER_LABEL("nsDOMWindowUtils::GarbageCollect", GCCC);
nsJSContext::GarbageCollectNow(JS::gcreason::DOM_UTILS);
nsJSContext::CycleCollectNow(aListener);

Просмотреть файл

@ -5565,9 +5565,9 @@ nsIDocument::GetClientInfo() const
{
nsPIDOMWindowInner* inner = GetInnerWindow();
if (inner) {
return std::move(inner->GetClientInfo());
return inner->GetClientInfo();
}
return std::move(Maybe<ClientInfo>());
return Maybe<ClientInfo>();
}
Maybe<ClientState>
@ -5575,9 +5575,9 @@ nsIDocument::GetClientState() const
{
nsPIDOMWindowInner* inner = GetInnerWindow();
if (inner) {
return std::move(inner->GetClientState());
return inner->GetClientState();
}
return std::move(Maybe<ClientState>());
return Maybe<ClientState>();
}
Maybe<ServiceWorkerDescriptor>
@ -5585,9 +5585,9 @@ nsIDocument::GetController() const
{
nsPIDOMWindowInner* inner = GetInnerWindow();
if (inner) {
return std::move(inner->GetController());
return inner->GetController();
}
return std::move(Maybe<ServiceWorkerDescriptor>());
return Maybe<ServiceWorkerDescriptor>();
}
//

Просмотреть файл

@ -921,7 +921,7 @@ bool
nsFrameLoader::ShowRemoteFrame(const ScreenIntSize& size,
nsSubDocumentFrame *aFrame)
{
AUTO_PROFILER_LABEL("nsFrameLoader::ShowRemoteFrame", GRAPHICS);
AUTO_PROFILER_LABEL("nsFrameLoader::ShowRemoteFrame", OTHER);
NS_ASSERTION(IsRemoteFrame(), "ShowRemote only makes sense on remote frames.");
if (!mRemoteBrowser && !TryRemoteBrowser()) {

Просмотреть файл

@ -509,7 +509,7 @@ nsFrameMessageManager::SendMessage(JSContext* aCx,
"Should not have parent manager in content!");
AUTO_PROFILER_LABEL_DYNAMIC_LOSSY_NSSTRING(
"nsFrameMessageManager::SendMessage", EVENTS, aMessageName);
"nsFrameMessageManager::SendMessage", OTHER, aMessageName);
if (sSendingSyncMessage && aIsSync) {
// No kind of blocking send should be issued on top of a sync message.

Просмотреть файл

@ -2320,25 +2320,25 @@ nsPIDOMWindowInner::SyncStateFromParentWindow()
Maybe<ClientInfo>
nsPIDOMWindowInner::GetClientInfo() const
{
return std::move(nsGlobalWindowInner::Cast(this)->GetClientInfo());
return nsGlobalWindowInner::Cast(this)->GetClientInfo();
}
Maybe<ClientState>
nsPIDOMWindowInner::GetClientState() const
{
return std::move(nsGlobalWindowInner::Cast(this)->GetClientState());
return nsGlobalWindowInner::Cast(this)->GetClientState();
}
Maybe<ServiceWorkerDescriptor>
nsPIDOMWindowInner::GetController() const
{
return std::move(nsGlobalWindowInner::Cast(this)->GetController());
return nsGlobalWindowInner::Cast(this)->GetController();
}
RefPtr<mozilla::dom::ServiceWorker>
nsPIDOMWindowInner::GetOrCreateServiceWorker(const mozilla::dom::ServiceWorkerDescriptor& aDescriptor)
{
return std::move(nsGlobalWindowInner::Cast(this)->GetOrCreateServiceWorker(aDescriptor));
return nsGlobalWindowInner::Cast(this)->GetOrCreateServiceWorker(aDescriptor);
}
void
@ -5498,7 +5498,7 @@ nsGlobalWindowInner::ShowSlowScriptDialog(const nsString& aAddonId)
// GetStringFromName can return NS_OK and still give nullptr string
failed = failed || NS_FAILED(rv) || result.IsEmpty();
return std::move(result);
return result;
};
bool isAddonScript = !aAddonId.IsEmpty();
@ -6329,7 +6329,7 @@ nsGlobalWindowInner::GetClientInfo() const
if (mClientSource) {
clientInfo.emplace(mClientSource->Info());
}
return std::move(clientInfo);
return clientInfo;
}
Maybe<ClientState>
@ -6344,7 +6344,7 @@ nsGlobalWindowInner::GetClientState() const
clientState.emplace(state);
}
}
return std::move(clientState);
return clientState;
}
Maybe<ServiceWorkerDescriptor>
@ -6355,7 +6355,7 @@ nsGlobalWindowInner::GetController() const
if (mClientSource) {
controller = mClientSource->GetController();
}
return std::move(controller);
return controller;
}
RefPtr<ServiceWorker>

Просмотреть файл

@ -1178,7 +1178,7 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason,
IsShrinking aShrinking,
int64_t aSliceMillis)
{
AUTO_PROFILER_LABEL_DYNAMIC_CSTR("nsJSContext::GarbageCollectNow", GC,
AUTO_PROFILER_LABEL_DYNAMIC_CSTR("nsJSContext::GarbageCollectNow", GCCC,
JS::gcreason::ExplainReason(aReason));
MOZ_ASSERT_IF(aSliceMillis, aIncremental == IncrementalGC);
@ -1231,7 +1231,7 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason,
static void
FinishAnyIncrementalGC()
{
AUTO_PROFILER_LABEL("FinishAnyIncrementalGC", GC);
AUTO_PROFILER_LABEL("FinishAnyIncrementalGC", GCCC);
if (sCCLockedOut) {
AutoJSAPI jsapi;
@ -1482,7 +1482,7 @@ nsJSContext::CycleCollectNow(nsICycleCollectorListener *aListener)
return;
}
AUTO_PROFILER_LABEL("nsJSContext::CycleCollectNow", CC);
AUTO_PROFILER_LABEL("nsJSContext::CycleCollectNow", GCCC);
gCCStats.PrepareForCycleCollectionSlice(TimeStamp());
nsCycleCollector_collect(aListener);
@ -1499,7 +1499,7 @@ nsJSContext::RunCycleCollectorSlice(TimeStamp aDeadline)
AUTO_PROFILER_TRACING("CC", aDeadline.IsNull() ? "CCSlice" : "IdleCCSlice");
AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorSlice", CC);
AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorSlice", GCCC);
gCCStats.PrepareForCycleCollectionSlice(aDeadline);
@ -1557,7 +1557,7 @@ nsJSContext::RunCycleCollectorWorkSlice(int64_t aWorkBudget)
return;
}
AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorWorkSlice", CC);
AUTO_PROFILER_LABEL("nsJSContext::RunCycleCollectorWorkSlice", GCCC);
gCCStats.PrepareForCycleCollectionSlice();

Просмотреть файл

@ -1579,7 +1579,7 @@ class CGAbstractMethod(CGThing):
def _auto_profiler_label(self):
profiler_label_and_jscontext = self.profiler_label_and_jscontext()
if profiler_label_and_jscontext:
return 'AUTO_PROFILER_LABEL_FAST("%s", OTHER, %s);' % profiler_label_and_jscontext
return 'AUTO_PROFILER_LABEL_FAST("%s", DOM, %s);' % profiler_label_and_jscontext
return None
def declare(self):

Просмотреть файл

@ -804,7 +804,7 @@ ImageBitmap::ToCloneData() const
result->mSurface = surface->GetDataSurface();
MOZ_ASSERT(result->mSurface);
return std::move(result);
return result;
}
/* static */ already_AddRefed<ImageBitmap>

Просмотреть файл

@ -827,7 +827,7 @@ FormatUsageAuthority::CreateForWebGL1(gl::GLContext* gl)
if (!AddUnsizedFormats(ptr, gl))
return nullptr;
return std::move(ret);
return ret;
}
UniquePtr<FormatUsageAuthority>
@ -1062,7 +1062,7 @@ FormatUsageAuthority::CreateForWebGL2(gl::GLContext* gl)
////////////////////////////////////
return std::move(ret);
return ret;
}
//////////////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -227,7 +227,7 @@ FromImageBitmap(WebGLContext* webgl, const char* funcName, TexImageTarget target
uint32_t width, uint32_t height, uint32_t depth,
const dom::ImageBitmap& imageBitmap)
{
UniquePtr<dom::ImageBitmapCloneData> cloneData = std::move(imageBitmap.ToCloneData());
UniquePtr<dom::ImageBitmapCloneData> cloneData = imageBitmap.ToCloneData();
if (!cloneData) {
return nullptr;
}
@ -460,7 +460,7 @@ ValidateTexOrSubImage(WebGLContext* webgl, const char* funcName, TexImageTarget
if (!blob || !blob->Validate(webgl, funcName, pi))
return nullptr;
return std::move(blob);
return blob;
}
void

Просмотреть файл

@ -203,7 +203,7 @@ ClientHandle::OnDetach()
}
RefPtr<GenericPromise> ref(mDetachPromise);
return std::move(ref);
return ref;
}
} // namespace dom

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше