WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
193816
[Curl] Fix DRT crash related to private browsing.
https://bugs.webkit.org/show_bug.cgi?id=193816
Summary
[Curl] Fix DRT crash related to private browsing.
Basuke Suzuki
Reported
2019-01-24 23:56:17 PST
Many tests under storage storage/indexeddb/ have started crash after fetching storageSession from NetworkingContext.
Attachments
Patch
(3.29 KB, patch)
2019-01-30 06:03 PST
,
Takashi Komori
no flags
Details
Formatted Diff
Diff
Patch
(3.08 KB, patch)
2019-01-30 23:52 PST
,
Takashi Komori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Takashi Komori
Comment 1
2019-01-30 06:03:27 PST
Created
attachment 360574
[details]
Patch
Takashi Komori
Comment 2
2019-01-30 06:20:32 PST
Curl port crashes when DRT tests private browsing mode. This is because lack of inmplementation of WebFrameNetworkingContext::ensurePrivateBrowsingSession() for Curl port. Attached patch fixes it.
Ross Kirsling
Comment 3
2019-01-30 09:48:53 PST
Seems good from my perspective, but I'd want Alex or Michael to give the r+ here.
Michael Catanzaro
Comment 4
2019-01-30 09:57:21 PST
Comment on
attachment 360574
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=360574&action=review
> Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:115 > + addResult.iterator->value = std::make_unique<WebCore::NetworkStorageSession>(sessionID, nullptr);
Unrelated: I think you should remove the second parameter from your NetworkStorageSession constructor. It's a curl-specific constructor, and I believe you have to always pass nullptr for it to not crash. :)
Alex Christensen
Comment 5
2019-01-30 10:45:20 PST
Comment on
attachment 360574
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=360574&action=review
Looks good to me.
> Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:111 > + auto addResult = globalSessionMap().add(sessionID, nullptr);
You could use HashMap::ensure here.
> Source/WebKitLegacy/win/WebCoreSupport/WebFrameNetworkingContext.cpp:91 > + if (auto privateSession = NetworkStorageSessionMap::storageSession(PAL::SessionID::legacyPrivateSessionID())) > + return *privateSession;
This seems unnecessary.
Takashi Komori
Comment 6
2019-01-30 23:52:56 PST
Created
attachment 360700
[details]
Patch
Takashi Komori
Comment 7
2019-01-30 23:57:57 PST
(In reply to Michael Catanzaro from
comment #4
)
> Unrelated: I think you should remove the second parameter from your > NetworkStorageSession constructor. It's a curl-specific constructor, and I > believe you have to always pass nullptr for it to not crash. :)
I agree. I will open another ticket for removing the parameter.
Takashi Komori
Comment 8
2019-01-30 23:58:26 PST
(In reply to Alex Christensen from
comment #5
)
> Comment on
attachment 360574
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=360574&action=review
> > Looks good to me. > > > Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:111 > > + auto addResult = globalSessionMap().add(sessionID, nullptr); > > You could use HashMap::ensure here. > > > Source/WebKitLegacy/win/WebCoreSupport/WebFrameNetworkingContext.cpp:91 > > + if (auto privateSession = NetworkStorageSessionMap::storageSession(PAL::SessionID::legacyPrivateSessionID())) > > + return *privateSession; > > This seems unnecessary.
Fixed.
WebKit Commit Bot
Comment 9
2019-01-31 09:04:40 PST
Comment on
attachment 360700
[details]
Patch Clearing flags on attachment: 360700 Committed
r240791
: <
https://trac.webkit.org/changeset/240791
>
WebKit Commit Bot
Comment 10
2019-01-31 09:04:41 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2019-01-31 09:05:29 PST
<
rdar://problem/47704080
>
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