Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
[WebKit-https.git] / Source / WebCore / bridge / c / c_instance.cpp
index d9ebdaf..faa88d2 100644 (file)
@@ -45,6 +45,7 @@
 #include <runtime/JSLock.h>
 #include <runtime/PropertyNameArray.h>
 #include <wtf/Assertions.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/StringExtras.h>
 #include <wtf/Vector.h>
@@ -56,7 +57,7 @@ namespace Bindings {
 
 static String& globalExceptionString()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, exceptionStr, ());
+    static NeverDestroyed<String> exceptionStr;
     return exceptionStr;
 }
 
@@ -79,7 +80,7 @@ void CInstance::moveGlobalExceptionToExecState(ExecState* exec)
 }
 
 CInstance::CInstance(NPObject* o, RefPtr<RootObject>&& rootObject)
-    : Instance(WTF::move(rootObject))
+    : Instance(WTFMove(rootObject))
 {
     _object = _NPN_RetainObject(o);
     _class = 0;