Bug 207419 - Make FormDataElement::lengthInBytes() safe to call on a non-main thread
Summary: Make FormDataElement::lengthInBytes() safe to call on a non-main thread
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-07 16:47 PST by Chris Dumez
Modified: 2020-02-10 08:17 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.54 KB, patch)
2020-02-07 16:49 PST, Chris Dumez
youennf: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-02-07 16:47:57 PST
Make FormDataElement::lengthInBytes() safe to call on a non-main thread:
Thread[8] EXC_BREAKPOINT (SIGTRAP) (0x0000000000000002, 0x0000000000000000)
[  0] 0x0000000101599583 WTFCrashWithInfo(int, char const*, char const*, int) + 19
[  1] 0x000000010153e1df WebKit::WebProcess::ensureNetworkProcessConnection() + 659
[  2] 0x000000010196757b WebKit::BlobRegistryProxy::blobSize(PAL::SessionID, WTF::URL const&) + 41
[  3] 0x0000000103eb8675 WebCore::FormDataElement::lengthInBytes(PAL::SessionID) const + 117
[  4] 0x000000010317eccb WebCore::CacheStorageConnection::computeRecordBodySize(WebCore::FetchResponse const&, WTF::Variant<std::nullptr_t, WTF::Ref<WebCore::FormData, WTF::DumbPtrTraits<WebCore::FormData> >, WTF::Ref<WebCore::SharedBuffer, WTF::DumbPtrTraits<WebCore::SharedBuffer> > > const&) + 683
[  5] 0x00000001031810d7 WebCore::DOMCache::toConnectionRecord(WebCore::FetchRequest const&, WebCore::FetchResponse&, WTF::Variant<std::nullptr_t, WTF::Ref<WebCore::FormData, WTF::DumbPtrTraits<WebCore::FormData> >, WTF::Ref<WebCore::SharedBuffer, WTF::DumbPtrTraits<WebCore::SharedBuffer> > >&&) + 615
[  6] 0x000000010318011c WebCore::DOMCache::batchPutOperation(WebCore::FetchRequest const&, WebCore::FetchResponse&, WTF::Variant<std::nullptr_t, WTF::Ref<WebCore::FormData, WTF::DumbPtrTraits<WebCore::FormData> >, WTF::Ref<WebCore::SharedBuffer, WTF::DumbPtrTraits<WebCore::SharedBuffer> > >&&, WTF::Function<void (WebCore::ExceptionOr<void>&&)>&&) + 60
[  7] 0x0000000103180a3a WebCore::DOMCache::put(WTF::Variant<WTF::RefPtr<WebCore::FetchRequest, WTF::DumbPtrTraits<WebCore::FetchRequest> >, WTF::String>&&, WTF::Ref<WebCore::FetchResponse, WTF::DumbPtrTraits<WebCore::FetchResponse> >&&, WebCore::DOMPromiseDeferred<void>&&) + 2026
[  8] 0x0000000102983d2b WebCore::jsDOMCachePrototypeFunctionPut(JSC::ExecState*) + 811
[  9] 0x0000414ae22012ab 0 + 71789877138091
[ 10] 0x00000001061678f7 llint_entry + 94158
[ 11] 0x00000001061678f7 llint_entry + 94158
Comment 1 Chris Dumez 2020-02-07 16:48:07 PST
<rdar://problem/54386521>
Comment 2 Chris Dumez 2020-02-07 16:49:44 PST
Created attachment 390148 [details]
Patch
Comment 3 Chris Dumez 2020-02-07 16:50:23 PST
Seems to be causing flaky crashes on the bots.
Comment 4 youenn fablet 2020-02-08 23:39:19 PST
Comment on attachment 390148 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390148&action=review

> Source/WebCore/ChangeLog:10
> +        ThreadableBlobRegistry. DOMCache code in workers may call this on worker threads for

s/for//
Comment 5 Chris Dumez 2020-02-10 08:17:41 PST
Committed r256173: <https://trac.webkit.org/changeset/256173>