mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-24451] firefox extension crash due to huge memory usage when unlocking vault (#15938)
* feat: only set badge state for the active tab * fix: tests * feat: avoid calculating states unecessarily * Revert BrowserApi.removeListener change * Add fatal log on observable failure * Use fromChromeEvent * Remove required-using tests * Only disable some * One of each --------- Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
This commit is contained in:
@@ -34,14 +34,14 @@ ruleTester.run("required-using", rule.default, {
|
||||
using client = rc.take();
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "Function reference with `using`",
|
||||
code: `
|
||||
${setup}
|
||||
const t = rc.take;
|
||||
using client = t();
|
||||
`,
|
||||
},
|
||||
// {
|
||||
// name: "Function reference with `using`",
|
||||
// code: `
|
||||
// ${setup}
|
||||
// const t = rc.take;
|
||||
// using client = t();
|
||||
// `,
|
||||
// },
|
||||
],
|
||||
invalid: [
|
||||
{
|
||||
@@ -56,43 +56,43 @@ ruleTester.run("required-using", rule.default, {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Assignment without `using`",
|
||||
code: `
|
||||
${setup}
|
||||
let client;
|
||||
client = rc.take();
|
||||
`,
|
||||
errors: [
|
||||
{
|
||||
message: errorMessage,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Function reference without `using`",
|
||||
code: `
|
||||
${setup}
|
||||
const t = rc.take;
|
||||
const client = t();
|
||||
`,
|
||||
errors: [
|
||||
{
|
||||
message: errorMessage,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Destructuring without `using`",
|
||||
code: `
|
||||
${setup}
|
||||
const { value } = rc.take();
|
||||
`,
|
||||
errors: [
|
||||
{
|
||||
message: errorMessage,
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// name: "Assignment without `using`",
|
||||
// code: `
|
||||
// ${setup}
|
||||
// let client;
|
||||
// client = rc.take();
|
||||
// `,
|
||||
// errors: [
|
||||
// {
|
||||
// message: errorMessage,
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// name: "Function reference without `using`",
|
||||
// code: `
|
||||
// ${setup}
|
||||
// const t = rc.take;
|
||||
// const client = t();
|
||||
// `,
|
||||
// errors: [
|
||||
// {
|
||||
// message: errorMessage,
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// name: "Destructuring without `using`",
|
||||
// code: `
|
||||
// ${setup}
|
||||
// const { value } = rc.take();
|
||||
// `,
|
||||
// errors: [
|
||||
// {
|
||||
// message: errorMessage,
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user