Skip to content

Commit

Permalink
Rename isBlobURLContainsNullOrigin to isBlobURLContainingNullOrigin
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259426
rdar://112731483

Reviewed by Tim Nguyen.

* Source/WebCore/fileapi/ThreadableBlobRegistry.cpp:
(WebCore::isBlobURLContainingNullOrigin):
(WebCore::addToOriginMapIfNecessary):
(WebCore::unregisterBlobURLOriginIfNecessaryOnMainThread):
(WebCore::ThreadableBlobRegistry::registerBlobURLHandle):
(WebCore::ThreadableBlobRegistry::getCachedOrigin):
(WebCore::isBlobURLContainsNullOrigin): Deleted.

Canonical link: https://commits.webkit.org/266258@main
  • Loading branch information
annevk committed Jul 24, 2023
1 parent d7f28b8 commit 2b1106b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Source/WebCore/fileapi/ThreadableBlobRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static HashCountedSet<String>& blobURLReferencesMap()
return map;
}

static inline bool isBlobURLContainsNullOrigin(const URL& url)
static inline bool isBlobURLContainingNullOrigin(const URL& url)
{
ASSERT(url.protocolIsBlob());
unsigned startIndex = url.pathStart();
Expand All @@ -85,7 +85,7 @@ static inline bool isInternalBlobURL(const URL& url)
// If the blob URL contains null origin, as in the context with unique security origin or file URL, save the mapping between url and origin so that the origin can be retrived when doing security origin check.
static void addToOriginMapIfNecessary(const URL& url, RefPtr<SecurityOrigin>&& origin)
{
if (!origin || !isBlobURLContainsNullOrigin(url))
if (!origin || !isBlobURLContainingNullOrigin(url))
return;

auto urlWithoutFragment = url.stringWithoutFragmentIdentifier();
Expand Down Expand Up @@ -125,7 +125,7 @@ void ThreadableBlobRegistry::registerInternalBlobURL(const URL& url, Vector<Blob
static void unregisterBlobURLOriginIfNecessaryOnMainThread(const URL& url)
{
ASSERT(isMainThread());
if (!isBlobURLContainsNullOrigin(url))
if (!isBlobURLContainingNullOrigin(url))
return;

auto urlWithoutFragment = url.stringWithoutFragmentIdentifier();
Expand Down Expand Up @@ -209,7 +209,7 @@ void ThreadableBlobRegistry::unregisterBlobURL(const URLKeepingBlobAlive& url)
void ThreadableBlobRegistry::registerBlobURLHandle(const URL& url, const std::optional<SecurityOriginData>&)
{
ensureOnMainThread([url = url.isolatedCopy()] {
if (isBlobURLContainsNullOrigin(url))
if (isBlobURLContainingNullOrigin(url))
blobURLReferencesMap().add(url.stringWithoutFragmentIdentifier());

blobRegistry().registerBlobURLHandle(url);
Expand Down Expand Up @@ -237,7 +237,7 @@ RefPtr<SecurityOrigin> ThreadableBlobRegistry::getCachedOrigin(const URL& url)
if (cachedOrigin)
return cachedOrigin;

if (!isBlobURLContainsNullOrigin(url))
if (!isBlobURLContainingNullOrigin(url))
return nullptr;

// If we do not have a cached origin for null blob URLs, we use an opaque origin.
Expand Down

0 comments on commit 2b1106b

Please sign in to comment.