String.trim somehow overridden with faulty code.

Bug #717838 reported by Nathan Osman
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Chromify-OSD
Status tracked in Extension
Extension
Fix Released
High
Marco Ceppi

Bug Description

This is very unusual, but occurs for me on Chrome 9.0.597.84 beta.

Running 'String.prototype.trim' in the JS console without Chromify-OSD installed indicates that Chrome is using native code for this function. As soon as the extension is installed, running that same command yields:

function ()
{
    return this.replace(/^\s*/, "").replace(/\s*$/, "").replace(/\n+/, "");
}

This wouldn't even be a problem except that the last RegEx replacement will erase the first newline in the string, which is not the intended and documented behavior in 'trim()'.

Related branches

Marco Ceppi (marcoceppi)
Changed in chromify-osd:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Marco Ceppi (marco-ceppi)
Marco Ceppi (marcoceppi)
Changed in chromify-osd:
status: Confirmed → Fix Committed
Marco Ceppi (marcoceppi)
Changed in chromify-osd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.