WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
185002
DocumentLoader::loadMainResource() should WTFMove() the passed ResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=185002
Summary
DocumentLoader::loadMainResource() should WTFMove() the passed ResourceRequest
Daniel Bates
Reported
2018-04-25 14:47:05 PDT
DocumentLoader::loadMainResource() should WTFMove() the passed ResourceRequest.
Attachments
Patch
(4.28 KB, patch)
2018-04-25 15:07 PDT
,
Daniel Bates
youennf
: review+
ews-watchlist
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-sierra
(994.74 KB, application/zip)
2018-04-25 16:18 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews122 for ios-simulator-wk2
(54.22 MB, application/zip)
2018-04-25 17:19 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews106 for mac-sierra-wk2
(907.67 KB, application/zip)
2018-04-25 17:41 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews116 for mac-sierra
(1.41 MB, application/zip)
2018-04-25 18:05 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews206 for win-future
(8.12 MB, application/zip)
2018-04-25 19:08 PDT
,
EWS Watchlist
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2018-04-25 15:07:40 PDT
Created
attachment 338805
[details]
Patch
EWS Watchlist
Comment 2
2018-04-25 16:18:41 PDT
Comment on
attachment 338805
[details]
Patch
Attachment 338805
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/7460742
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 3
2018-04-25 16:18:42 PDT
Created
attachment 338817
[details]
Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 4
2018-04-25 17:19:08 PDT
Comment on
attachment 338805
[details]
Patch
Attachment 338805
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/7461159
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 5
2018-04-25 17:19:10 PDT
Created
attachment 338832
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.4
EWS Watchlist
Comment 6
2018-04-25 17:41:54 PDT
Comment on
attachment 338805
[details]
Patch
Attachment 338805
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/7461766
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 7
2018-04-25 17:41:56 PDT
Created
attachment 338836
[details]
Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 8
2018-04-25 18:05:54 PDT
Comment on
attachment 338805
[details]
Patch
Attachment 338805
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/7461926
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 9
2018-04-25 18:05:56 PDT
Created
attachment 338839
[details]
Archive of layout-test-results from ews116 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 10
2018-04-25 19:08:28 PDT
Comment on
attachment 338805
[details]
Patch
Attachment 338805
[details]
did not pass win-ews (win): Output:
http://webkit-queues.webkit.org/results/7462864
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 11
2018-04-25 19:08:36 PDT
Created
attachment 338847
[details]
Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Alex Christensen
Comment 12
2018-04-26 09:58:12 PDT
Comment on
attachment 338805
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338805&action=review
> Source/WebCore/loader/DocumentLoader.cpp:1795 > + ResourceRequest updatedRequest; > if (mainResourceLoader()) > - request = mainResourceLoader()->originalRequest(); > + updatedRequest = mainResourceLoader()->originalRequest();
Isn't this a change in behavior if mainResourceLoader() is null?
Daniel Bates
Comment 13
2018-04-26 10:41:06 PDT
(In reply to Alex Christensen from
comment #12
)
> Comment on
attachment 338805
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=338805&action=review
> > > Source/WebCore/loader/DocumentLoader.cpp:1795 > > + ResourceRequest updatedRequest; > > if (mainResourceLoader()) > > - request = mainResourceLoader()->originalRequest(); > > + updatedRequest = mainResourceLoader()->originalRequest(); > > Isn't this a change in behavior if mainResourceLoader() is null?
Yes, it is a change in behavior hence the failures. This is unintentional. Will change this snippet to read: - ResourceRequest updatedRequest; - if (mainResourceLoader()) - updatedRequest = mainResourceLoader()->originalRequest(); + ResourceRequest updatedRequest = mainResourceLoader() ? mainResourceLoader()->originalRequest() : mainResourceRequest.resourceRequest();
Daniel Bates
Comment 14
2018-04-26 10:47:12 PDT
Committed
r231052
: <
https://trac.webkit.org/changeset/231052
>
Ryan Haddad
Comment 15
2018-04-26 13:09:22 PDT
This change caused http/tests/security/credentials-main-resource.html to fail on iOS and macOS:
https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/r231061%20(4939)/results.html
WebKit Commit Bot
Comment 16
2018-04-26 13:34:06 PDT
Re-opened since this is blocked by
bug 185044
Daniel Bates
Comment 17
2018-04-26 13:35:31 PDT
(In reply to Ryan Haddad from
comment #15
)
> This change caused http/tests/security/credentials-main-resource.html to > fail on iOS and macOS: >
https://build.webkit.org/results/
> Apple%20High%20Sierra%20Release%20WK1%20(Tests)/r231061%20(4939)/results.html
For historical preservation, here is the diff: [[ --- /Volumes/Data/slave/highsierra-release-tests-wk1/build/layout-test-results/http/tests/security/credentials-main-resource-expected.txt +++ /Volumes/Data/slave/highsierra-release-tests-wk1/build/layout-test-results/http/tests/security/credentials-main-resource-actual.txt @@ -1,3 +1,4 @@ -ALERT: Authenticated as user: testuser password: testpass +
http://127.0.0.1:8000/security/resources/basic-auth.php?username=testuser&password=testpass
- didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet +ALERT: Sent username:password of (:) which is not what was expected Main Resource Credentials: testuser, testpass ]]
Daniel Bates
Comment 18
2018-04-26 13:36:32 PDT
The failure implies that the test depends on DocumentLoader::loadMainResource() making a copy of the passed ResourceRequest because the passed ResourceRequest is mutated.
Daniel Bates
Comment 19
2018-04-26 13:39:19 PDT
(In reply to Daniel Bates from
comment #18
)
> The failure implies that the test depends on > DocumentLoader::loadMainResource() making a copy of the passed > ResourceRequest because the passed ResourceRequest is mutated.
Disregard this remark.
Daniel Bates
Comment 20
2018-04-26 13:43:45 PDT
Committed
r231068
: <
https://trac.webkit.org/changeset/231068
>
Daniel Bates
Comment 21
2018-04-26 13:51:00 PDT
Committed build fix in <
https://trac.webkit.org/changeset/231071
>.
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