| Summary: | Incorrect location.origin in blob workers | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Naman Nehra <naman.nehra98> | ||||
| Component: | Page Loading | Assignee: | youenn fablet <youennf> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | achristensen, beidson, cdumez, ews-watchlist, mkwst, sihui_liu, webkit-bug-importer, youennf | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 13 | ||||||
| Hardware: | Mac | ||||||
| OS: | macOS 10.15 | ||||||
| Attachments: |
|
||||||
|
Description
Naman Nehra
2020-05-13 19:41:59 PDT
Created attachment 399821 [details]
Patch
Comment on attachment 399821 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399821&action=review > Source/WebCore/workers/WorkerLocation.cpp:78 > - return SecurityOriginData::fromURL(m_url).toString(); > + return m_origin; Instead of keeping m_origin, you probably want SecurityOrigin::create(m_url), which seems to handle the blob case. > Instead of keeping m_origin, you probably want
> SecurityOrigin::create(m_url), which seems to handle the blob case.
We are trying to reduce the number of times we create origins from background threads.
I believe we are creating the WorkerGlobalScope origin on the main thread for instance e.
Also, by reusing the WorkerGlobalScope origin, we ensure consistency and it removes the need to allocate a new SecurityOrigin object for a very short period of time.
(In reply to youenn fablet from comment #4) > > Instead of keeping m_origin, you probably want > > SecurityOrigin::create(m_url), which seems to handle the blob case. > > We are trying to reduce the number of times we create origins from > background threads. > I believe we are creating the WorkerGlobalScope origin on the main thread > for instance e. > > Also, by reusing the WorkerGlobalScope origin, we ensure consistency and it > removes the need to allocate a new SecurityOrigin object for a very short > period of time. Ah Okay, the fix should work. Committed r262026: <https://trac.webkit.org/changeset/262026> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399821 [details]. |