-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Clear up Console::internal_warn usages #43091
Copy link
Copy link
Closed
Labels
A-content/scriptRelated to the script threadRelated to the script threadE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.I-cleanupNo impact; the issue is one of maintainability or tidiness.No impact; the issue is one of maintainability or tidiness.good first issueNewcomer-friendly issues.Newcomer-friendly issues.
Metadata
Metadata
Assignees
Labels
A-content/scriptRelated to the script threadRelated to the script threadE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.I-cleanupNo impact; the issue is one of maintainability or tidiness.No impact; the issue is one of maintainability or tidiness.good first issueNewcomer-friendly issues.Newcomer-friendly issues.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Noticed this while working on import maps, all
Console::internal_warncallers instantiate aDOMStringjust for it, which will then clone the value. We probably should just use a String and remove the call to clone.servo/components/script/dom/console.rs
Lines 122 to 124 in cea658e
Task:
Change the signature of the
Console::internal_warnso that the second argument is aStringtype and remove the call toclonein the method body. Compilation should show errors at all existing callers tointernal_warnthat need to be modified. At those call sites, we can directly pass the result offormat!tointernal_warninstead of passing it toDOMString::from.