Index: Source/core/fetch/FetchUtils.cpp |
diff --git a/Source/core/fetch/FetchUtils.cpp b/Source/core/fetch/FetchUtils.cpp |
index 8f9c4531eaa29e6ccd265b312fc1087eb34c8edf..5460f74fe6f0478acd9bf29eedccbb20991e1257 100644 |
--- a/Source/core/fetch/FetchUtils.cpp |
+++ b/Source/core/fetch/FetchUtils.cpp |
@@ -26,7 +26,7 @@ public: |
|| name.startsWith(m_secHeaderPrefix, false); |
} |
- static const ForbiddenHeaderNames* get(); |
+ static const ForbiddenHeaderNames& get(); |
private: |
ForbiddenHeaderNames(); |
@@ -63,9 +63,9 @@ ForbiddenHeaderNames::ForbiddenHeaderNames() |
m_fixedNames.add("via"); |
} |
-const ForbiddenHeaderNames* ForbiddenHeaderNames::get() |
+const ForbiddenHeaderNames& ForbiddenHeaderNames::get() |
{ |
- AtomicallyInitializedStatic(const ForbiddenHeaderNames*, instance = new ForbiddenHeaderNames); |
+ AtomicallyInitializedStaticReference(const ForbiddenHeaderNames, instance, new ForbiddenHeaderNames); |
return instance; |
} |
@@ -139,7 +139,7 @@ bool FetchUtils::isForbiddenHeaderName(const String& name) |
// or starts with `Proxy-` or `Sec-` (including when it is just `Proxy-` or |
// `Sec-`)." |
- return ForbiddenHeaderNames::get()->has(name); |
+ return ForbiddenHeaderNames::get().has(name); |
} |
bool FetchUtils::isForbiddenResponseHeaderName(const String& name) |