Refactoring(?) bug in SecurityOrigin::create.
<rdar://problem/14437753>
Created attachment 206626 [details] Patch
Comment on attachment 206626 [details] Patch Attachment 206626 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1040840 New failing tests: svg/batik/text/smallFonts.svg
Created attachment 206632 [details] Archive of layout-test-results from webkit-ews-04 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-04 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Comment on attachment 206626 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206626&action=review > Source/WebCore/page/SecurityOrigin.cpp:542 > if (port < 0 || port > MaxAllowedPort) > - createUnique(); > + return createUnique(); Existing code is clearly wrong, however I'm not sure why we try to do this in the first place. A second layer of defense against invalid typecasts elsewhere?
Committed r152623: <http://trac.webkit.org/changeset/152623>
(In reply to comment #5) > (From update of attachment 206626 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=206626&action=review > > > Source/WebCore/page/SecurityOrigin.cpp:542 > > if (port < 0 || port > MaxAllowedPort) > > - createUnique(); > > + return createUnique(); > > Existing code is clearly wrong, however I'm not sure why we try to do this in the first place. A second layer of defense against invalid typecasts elsewhere? The same check is made in the function above this one, in createFromDatabaseIdentifier. The returned origin, in that case, however, is not a unique one.