When the Url::host setter is invoked for an URL in the file scheme, the parser starts in the "host state" (not the "file host state") so the URL can (per spec) end up with a non-null port number, which otherwise never happens.
In this test case: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3927 Firefox doesn’t change the URL at all, Chromium changes the host but not the port number.