Skip to content

Commit

Permalink
Deploy Oct 15, 2024 (#5161)
Browse files Browse the repository at this point in the history
[Julien Wajsberg] Synchronously update the view after shortening an URL
so that we can select it synchronously (#5158)
[Nazım Can Altınova] Remove the console warnings that are happening
while computing the tab to thread indexes map (#5160)
  • Loading branch information
canova authored Oct 15, 2024
2 parents ced28a5 + 3301a8b commit cf8501c
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 48 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@codemirror/lang-rust": "^6.0.1",
"@codemirror/language": "^6.10.3",
"@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.33.0",
"@codemirror/view": "^6.34.1",
"@firefox-devtools/react-contextmenu": "^5.1.1",
"@fluent/bundle": "^0.18.0",
"@fluent/langneg": "^0.7.0",
Expand Down Expand Up @@ -133,9 +133,9 @@
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-testing-library": "^6.3.0",
"espree": "^10.1.0",
"espree": "^10.2.0",
"fake-indexeddb": "^6.0.0",
"fetch-mock-jest": "^1.5.1",
"file-loader": "^6.2.0",
Expand All @@ -155,7 +155,7 @@
"node-fetch": "^2.6.11",
"npm-run-all": "^4.1.5",
"open": "^10.1.0",
"postcss": "^8.4.45",
"postcss": "^8.4.47",
"postcss-loader": "^8.1.1",
"prettier": "^3.3.3",
"raw-loader": "^4.0.2",
Expand All @@ -164,7 +164,7 @@
"stylelint": "^16.9.0",
"stylelint-config-idiomatic-order": "^10.0.0",
"stylelint-config-standard": "^36.0.1",
"webpack": "^5.94.0",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0",
"workbox-webpack-plugin": "^7.1.0",
Expand Down
11 changes: 9 additions & 2 deletions src/components/app/MenuButtons/Permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// @flow

import * as React from 'react';
import { flushSync } from 'react-dom';
import { ButtonWithPanel } from 'firefox-profiler/components/shared/ButtonWithPanel';
import * as UrlUtils from 'firefox-profiler/utils/shorten-url';

Expand Down Expand Up @@ -43,12 +44,18 @@ export class MenuButtonsPermalink extends React.PureComponent<Props, State> {
const shortenUrl = this.props.injectedUrlShortener || UrlUtils.shortenUrl;
try {
const shortUrl = await shortenUrl(currentFullUrl);
this.setState({ shortUrl, fullUrl: currentFullUrl });
// Synchronously update the view from this state change, so that the
// selection works later on.
flushSync(() => {
this.setState({ shortUrl, fullUrl: currentFullUrl });
});
} catch (error) {
console.warn('Unable to shorten the URL.', error);
// Don't remember the fullUrl so that we will attempt to shorten the
// URL again.
this.setState({ shortUrl: currentFullUrl, fullUrl: '' });
flushSync(() => {
this.setState({ shortUrl: currentFullUrl, fullUrl: '' });
});
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/profile-logic/profile-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -3747,9 +3747,6 @@ export function computeTabToThreadIndexesMap(
if (tabID === undefined) {
// We couldn't find the tab of this innerWindowID, this should
// never happen, it might indicate a bug in Firefox.
console.warn(
`Failed to find the tabID of innerWindowID ${innerWindowID}`
);
continue;
}

Expand Down Expand Up @@ -3780,9 +3777,6 @@ export function computeTabToThreadIndexesMap(
if (tabID === undefined) {
// We couldn't find the tab of this innerWindowID, this should
// never happen, it might indicate a bug in Firefox.
console.warn(
`Failed to find the tabID of innerWindowID ${innerWindowID}`
);
continue;
}

Expand Down
70 changes: 35 additions & 35 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1166,10 +1166,10 @@
resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.4.1.tgz#da57143695c056d9a3c38705ed34136e2b68171b"
integrity sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==

"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0", "@codemirror/view@^6.33.0":
version "6.33.0"
resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.33.0.tgz#51e270410fc3af92a6e38798e80ebf8add7dc3ec"
integrity sha512-AroaR3BvnjRW8fiZBalAaK+ZzB5usGgI014YKElYZvQdNH5ZIidHlO+cyf/2rWzyBFRkvG6VhiXeAEbC53P2YQ==
"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0", "@codemirror/view@^6.34.1":
version "6.34.1"
resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.34.1.tgz#b17ed29c563e4adc60086233f2d3e7197e2dc33e"
integrity sha512-t1zK/l9UiRqwUNPm+pdIT0qzJlzuVckbTEMVNFhfWkGiBQClstzg+78vedCvLSX0xJEZ6lwZbPpnljL7L6iwMQ==
dependencies:
"@codemirror/state" "^6.4.0"
style-mod "^4.1.0"
Expand Down Expand Up @@ -5081,10 +5081,10 @@ eslint-plugin-jest@^28.8.3:
dependencies:
"@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0"

eslint-plugin-react@^7.35.2:
version "7.35.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.35.2.tgz#d32500d3ec268656d5071918bfec78cfd8b070ed"
integrity sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ==
eslint-plugin-react@^7.37.1:
version "7.37.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.1.tgz#56493d7d69174d0d828bc83afeffe96903fdadbd"
integrity sha512-xwTnwDqzbDRA8uJ7BMxPs/EXRB3i8ZfnOIp8BsxEQkT0nHPp+WWceqGgo6rKb9ctNi8GJLDT4Go5HAWELa/WMg==
dependencies:
array-includes "^3.1.8"
array.prototype.findlast "^1.2.5"
Expand Down Expand Up @@ -5155,10 +5155,10 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==

eslint-visitor-keys@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb"
integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==
eslint-visitor-keys@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz#1f785cc5e81eb7534523d85922248232077d2f8c"
integrity sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==

eslint@^6.0.1:
version "6.8.0"
Expand Down Expand Up @@ -5247,14 +5247,14 @@ eslint@^8.57.1:
strip-ansi "^6.0.1"
text-table "^0.2.0"

espree@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56"
integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==
espree@^10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-10.2.0.tgz#f4bcead9e05b0615c968e85f83816bc386a45df6"
integrity sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==
dependencies:
acorn "^8.12.0"
acorn-jsx "^5.3.2"
eslint-visitor-keys "^4.0.0"
eslint-visitor-keys "^4.1.0"

espree@^6.1.2:
version "6.2.1"
Expand Down Expand Up @@ -10043,10 +10043,10 @@ photon-colors@^3.3.2:
resolved "https://registry.yarnpkg.com/photon-colors/-/photon-colors-3.3.2.tgz#eaf2e5a8ba9368fcdee0607cc86a9f613e6d3417"
integrity sha512-xCeL7J2F8cjM00zQZEZawHAGnrSOM509RbanL4c8hvrV8n19V/wwdzydX6rSUEtLYj4nx4OvhmKC4/vujo9f/Q==

picocolors@^1.0.0, picocolors@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1"
integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==
picocolors@^1.0.0, picocolors@^1.0.1, picocolors@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59"
integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==

picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1:
version "2.3.1"
Expand Down Expand Up @@ -10382,14 +10382,14 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==

postcss@^8.4.32, postcss@^8.4.33, postcss@^8.4.41, postcss@^8.4.45:
version "8.4.45"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.45.tgz#538d13d89a16ef71edbf75d895284ae06b79e603"
integrity sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==
postcss@^8.4.32, postcss@^8.4.33, postcss@^8.4.41, postcss@^8.4.47:
version "8.4.47"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365"
integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==
dependencies:
nanoid "^3.3.7"
picocolors "^1.0.1"
source-map-js "^1.2.0"
picocolors "^1.1.0"
source-map-js "^1.2.1"

prelude-ls@^1.2.1:
version "1.2.1"
Expand Down Expand Up @@ -11678,10 +11678,10 @@ source-list-map@^2.0.0:
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==

source-map-js@^1.0.1, source-map-js@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af"
integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==
source-map-js@^1.0.1, source-map-js@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46"
integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==

[email protected]:
version "0.5.13"
Expand Down Expand Up @@ -13283,10 +13283,10 @@ webpack-sources@^3.2.3:
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==

webpack@^5.94.0:
version "5.94.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f"
integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==
webpack@^5.95.0:
version "5.95.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0"
integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==
dependencies:
"@types/estree" "^1.0.5"
"@webassemblyjs/ast" "^1.12.1"
Expand Down

0 comments on commit cf8501c

Please sign in to comment.