WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
185035
Rename NetworkLoadChecker::returnError() to NetworkLoadChecker::accessControlErrorForValidationHandler()
https://bugs.webkit.org/show_bug.cgi?id=185035
Summary
Rename NetworkLoadChecker::returnError() to NetworkLoadChecker::accessControl...
Daniel Bates
Reported
2018-04-26 10:53:18 PDT
The name NetworkLoadChecker::returnError() is disingenuous as this function can either return a ResourceRequest object or an Error object. We should come up with more accurate name for this function.
Attachments
Patch
(5.32 KB, patch)
2018-04-26 10:56 PDT
,
Daniel Bates
youennf
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2018-04-26 10:56:42 PDT
Created
attachment 338893
[details]
Patch
Daniel Bates
Comment 2
2018-04-26 10:58:22 PDT
Comment on
attachment 338893
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338893&action=review
> Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:193 > String message = makeString("Unsafe attempt to load URL ", request.url().stringCenterEllipsizedToLength(), " from origin ", m_origin->toString(), ". Domains, protocols and ports must match.\n");
Will rename message to error before landing.
youenn fablet
Comment 3
2018-04-26 11:02:28 PDT
Comment on
attachment 338893
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338893&action=review
> Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:147 > +NetworkLoadChecker::RequestOrError NetworkLoadChecker::createRequestOrError(String&& error)
createRequestOrError seems a bit odd. How about createValidationError?
Daniel Bates
Comment 4
2018-04-26 11:12:50 PDT
(In reply to youenn fablet from
comment #3
)
> Comment on
attachment 338893
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=338893&action=review
> > > Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:147 > > +NetworkLoadChecker::RequestOrError NetworkLoadChecker::createRequestOrError(String&& error) > > createRequestOrError seems a bit odd. > How about createValidationError?
From our IRC conversation, will rename to accessControlErrorForValidationHandler.
Daniel Bates
Comment 5
2018-04-26 11:21:16 PDT
(In reply to Daniel Bates from
comment #2
)
> Comment on
attachment 338893
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=338893&action=review
> > > Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:193 > > String message = makeString("Unsafe attempt to load URL ", request.url().stringCenterEllipsizedToLength(), " from origin ", m_origin->toString(), ". Domains, protocols and ports must match.\n"); > > Will rename message to error before landing.
Actually will keep as-is and rename argument to accessControlErrorForValidationHandler() to message to describe that its argument represents the error message for the access control error. Will change other locals named "error" to "message" when passed to accessControlErrorForValidationHandler().
Daniel Bates
Comment 6
2018-04-26 11:29:37 PDT
Committed
r231059
: <
https://trac.webkit.org/changeset/231059
>
Radar WebKit Bug Importer
Comment 7
2018-04-26 11:30:33 PDT
<
rdar://problem/39764569
>
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