WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
186902
WKURLSchemeHandler doesn't handle sync XHR
https://bugs.webkit.org/show_bug.cgi?id=186902
Summary
WKURLSchemeHandler doesn't handle sync XHR
Brady Eidson
Reported
2018-06-21 17:10:13 PDT
WKURLSchemeHandler doesn't handle sync XHR <
rdar://problem/40955884
>
Attachments
Patch
(25.73 KB, patch)
2018-06-21 17:15 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(25.98 KB, patch)
2018-06-21 21:38 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(27.02 KB, patch)
2018-06-22 14:03 PDT
,
Brady Eidson
cdumez
: review+
Details
Formatted Diff
Diff
Patch
(28.97 KB, patch)
2018-06-22 15:42 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2018-06-21 17:15:07 PDT
Created
attachment 343295
[details]
Patch Have ideas for test enhancements I plan to get to tomorrow, but the code itself is reviewable.
EWS Watchlist
Comment 2
2018-06-21 17:18:02 PDT
Attachment 343295
[details]
did not pass style-queue: ERROR: Source/WebKit/WebProcess/Network/WebLoaderStrategy.h:99: The parameter name "identifier" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:471: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:476: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:480: Extra space before ( in function call [whitespace/parens] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:486: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 5 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 3
2018-06-21 21:38:32 PDT
Created
attachment 343308
[details]
Patch
EWS Watchlist
Comment 4
2018-06-21 21:39:41 PDT
Attachment 343308
[details]
did not pass style-queue: ERROR: Source/WebKit/WebProcess/Network/WebLoaderStrategy.h:101: The parameter name "identifier" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:467: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:472: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:476: Extra space before ( in function call [whitespace/parens] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:482: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 5 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 5
2018-06-22 14:03:14 PDT
Created
attachment 343363
[details]
Patch
EWS Watchlist
Comment 6
2018-06-22 14:05:12 PDT
Attachment 343363
[details]
did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:482: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:488: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:492: Extra space before ( in function call [whitespace/parens] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:498: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 4 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 7
2018-06-22 14:43:06 PDT
Comment on
attachment 343363
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=343363&action=review
> Source/WebKit/Shared/WebErrors.cpp:62 > + return ResourceError(errorDomainWebKitInternal, 0, request.url(), WEB_UI_STRING("Error handling synchronous load with custom protocol", "Custom protocol synchronous load failure description"));
Don't you need to run Tools/Scripts/update-webkit-localizable-strings too?
> Source/WebKit/UIProcess/WebURLSchemeHandler.h:46 > +typedef CompletionHandler<void(const WebCore::ResourceResponse&, const WebCore::ResourceError&, const IPC::DataReference&)> SyncLoadCompletionHandler;
I think we like "using SyncLoadCompletionHandler = CompletionHandler<void(const WebCore::ResourceResponse&, const WebCore::ResourceError&, const IPC::DataReference&)>;" better in new code.
> Source/WebKit/UIProcess/WebURLSchemeTask.h:51 > +typedef CompletionHandler<void(const WebCore::ResourceResponse&, const WebCore::ResourceError&, const IPC::DataReference&)> SyncLoadCompletionHandler;
using ?
> Source/WebKit/UIProcess/WebURLSchemeTask.h:82 > + bool isSync() const { return !!m_syncCompletionHandler; }
It may not matter but note that isSync() will start returning false after the m_syncCompletionHandler has been called. So it will only be sync until it is completed.
Brady Eidson
Comment 8
2018-06-22 15:42:08 PDT
(In reply to Chris Dumez from
comment #7
)
> Comment on
attachment 343363
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=343363&action=review
> > > Source/WebKit/Shared/WebErrors.cpp:62 > > + return ResourceError(errorDomainWebKitInternal, 0, request.url(), WEB_UI_STRING("Error handling synchronous load with custom protocol", "Custom protocol synchronous load failure description")); > > Don't you need to run Tools/Scripts/update-webkit-localizable-strings too?
Yah.
> > > Source/WebKit/UIProcess/WebURLSchemeHandler.h:46 > > +typedef CompletionHandler<void(const WebCore::ResourceResponse&, const WebCore::ResourceError&, const IPC::DataReference&)> SyncLoadCompletionHandler; > > I think we like "using SyncLoadCompletionHandler = > CompletionHandler<void(const WebCore::ResourceResponse&, const > WebCore::ResourceError&, const IPC::DataReference&)>;" better in new code.
Sure.
> > > Source/WebKit/UIProcess/WebURLSchemeTask.h:51 > > +typedef CompletionHandler<void(const WebCore::ResourceResponse&, const WebCore::ResourceError&, const IPC::DataReference&)> SyncLoadCompletionHandler; > > using ?
Sure.
> > > Source/WebKit/UIProcess/WebURLSchemeTask.h:82 > > + bool isSync() const { return !!m_syncCompletionHandler; } > > It may not matter but note that isSync() will start returning false after > the m_syncCompletionHandler has been called. So it will only be sync until > it is completed.
Known and by design.
Brady Eidson
Comment 9
2018-06-22 15:42:21 PDT
Created
attachment 343378
[details]
Patch
EWS Watchlist
Comment 10
2018-06-22 15:45:27 PDT
Attachment 343378
[details]
did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:482: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:488: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:492: Extra space before ( in function call [whitespace/parens] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:498: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 4 in 19 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 11
2018-06-22 17:34:55 PDT
Comment on
attachment 343378
[details]
Patch Clearing flags on attachment: 343378 Committed
r233113
: <
https://trac.webkit.org/changeset/233113
>
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