WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
87002
SecurityOrigin returns 0 as port when it is the default port for the protocol
https://bugs.webkit.org/show_bug.cgi?id=87002
Summary
SecurityOrigin returns 0 as port when it is the default port for the protocol
Thiago Marcos P. Santos
Reported
2012-05-21 04:28:33 PDT
It should return the correct value instead, like 80 for http, 443 for https, etc.
Attachments
Patch
(4.42 KB, patch)
2012-05-21 06:03 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Patch
(5.21 KB, patch)
2012-05-21 07:41 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Patch
(6.36 KB, patch)
2012-05-21 09:24 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Thiago Marcos P. Santos
Comment 1
2012-05-21 06:03:10 PDT
Created
attachment 143015
[details]
Patch
Build Bot
Comment 2
2012-05-21 06:48:59 PDT
Comment on
attachment 143015
[details]
Patch
Attachment 143015
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/12738424
Thiago Marcos P. Santos
Comment 3
2012-05-21 07:41:32 PDT
Created
attachment 143032
[details]
Patch
Build Bot
Comment 4
2012-05-21 08:18:18 PDT
Comment on
attachment 143032
[details]
Patch
Attachment 143032
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/12732663
Adam Barth
Comment 5
2012-05-21 09:15:49 PDT
Comment on
attachment 143032
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=143032&action=review
Please add an API test that shows the change in behavior. These tests are easy to write for Chromium, but you should feel free to write one for a different port if you prefer. Would you be willing to list in this bug which APIs are changing in which port? There's some risk of a compatibility problem. For example, if some client of the API is trying to construct storage identifiers manually, they might get a different answer after this patch...
> Source/WebCore/WebCore.order:6589 > +__ZNK7WebCore14SecurityOrigin4portEv
You probably need to add this line to WebCore.exp.in to fix the apple-mac build.
> Source/WebCore/page/SecurityOrigin.h:68 > - unsigned short port() const { return m_port; } > + unsigned short port() const;
I wonder if we should change the name of this function so it doesn't look like an accessor for m_port. Perhaps we should call it portNumber()?
Adam Barth
Comment 6
2012-05-21 09:17:22 PDT
It's still slightly unclear to me whether this patch is solving a real problem. We need to balance the risk of changing an API against the benefit of doing so. I don't mind changing this in the Chromium API, but other folks might be more conservative about how they'd like their APIs to evolve.
Thiago Marcos P. Santos
Comment 7
2012-05-21 09:24:20 PDT
Created
attachment 143047
[details]
Patch
Thiago Marcos P. Santos
Comment 8
2012-05-21 09:47:34 PDT
It is too risky to change this method. Should be fixed on the API layer if needed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug