WebKit Bugzilla
Attachment 362124 Details for
Bug 194710
: REGRESSION(r241559): Causes layout test crashes under GuardMalloc (Requested by ryanhaddad on #webkit).
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ROLLOUT of r241559
bug-194710-20190215102028.patch (text/plain), 113.78 KB, created by
WebKit Commit Bot
on 2019-02-15 10:20:29 PST
(
hide
)
Description:
ROLLOUT of r241559
Filename:
MIME Type:
Creator:
WebKit Commit Bot
Created:
2019-02-15 10:20:29 PST
Size:
113.78 KB
patch
obsolete
>Subversion Revision: 241591 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 8fc4900a2474ca93bec0a99a4ad614f861caa2a2..03cd1a4dfc5d5b24ef35d4d268d34fede1e4be3f 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-15 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r241559 and r241566. >+ https://bugs.webkit.org/show_bug.cgi?id=194710 >+ >+ Causes layout test crashes under GuardMalloc (Requested by >+ ryanhaddad on #webkit). >+ >+ Reverted changesets: >+ >+ "[WTF] Add environment variable helpers" >+ https://bugs.webkit.org/show_bug.cgi?id=192405 >+ https://trac.webkit.org/changeset/241559 >+ >+ "Unreviewed build fix for WinCairo Debug after r241559." >+ https://trac.webkit.org/changeset/241566 >+ > 2019-02-15 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Do not even allocate JIT worklists in non-JIT mode >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index e0d14a34fb7eab18b67e5e781f95f08da3649cc1..498e5e06afcb4fd49a3babe765ecec5d85dda42f 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-15 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r241559 and r241566. >+ https://bugs.webkit.org/show_bug.cgi?id=194710 >+ >+ Causes layout test crashes under GuardMalloc (Requested by >+ ryanhaddad on #webkit). >+ >+ Reverted changesets: >+ >+ "[WTF] Add environment variable helpers" >+ https://bugs.webkit.org/show_bug.cgi?id=192405 >+ https://trac.webkit.org/changeset/241559 >+ >+ "Unreviewed build fix for WinCairo Debug after r241559." >+ https://trac.webkit.org/changeset/241566 >+ > 2019-02-15 Truitt Savell <tsavell@apple.com> > > Unreviewed, rolling out r241564. >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 07fc22ab260888b67dc4628ba27b53113da3d9aa..a77f28c802087cc5c5ca88bc2d6dc5ecda86c1f1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-15 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r241559 and r241566. >+ https://bugs.webkit.org/show_bug.cgi?id=194710 >+ >+ Causes layout test crashes under GuardMalloc (Requested by >+ ryanhaddad on #webkit). >+ >+ Reverted changesets: >+ >+ "[WTF] Add environment variable helpers" >+ https://bugs.webkit.org/show_bug.cgi?id=192405 >+ https://trac.webkit.org/changeset/241559 >+ >+ "Unreviewed build fix for WinCairo Debug after r241559." >+ https://trac.webkit.org/changeset/241566 >+ > 2019-02-15 Zalan Bujtas <zalan@apple.com> > > [LFC] Out-of-flow box is never a float box >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 3dd4da0e6f3a9026c5c4da67061573fd32bf9eb4..73e3c9f45364a9d77029f91bf569e67bd2d6b5b2 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-15 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r241559 and r241566. >+ https://bugs.webkit.org/show_bug.cgi?id=194710 >+ >+ Causes layout test crashes under GuardMalloc (Requested by >+ ryanhaddad on #webkit). >+ >+ Reverted changesets: >+ >+ "[WTF] Add environment variable helpers" >+ https://bugs.webkit.org/show_bug.cgi?id=192405 >+ https://trac.webkit.org/changeset/241559 >+ >+ "Unreviewed build fix for WinCairo Debug after r241559." >+ https://trac.webkit.org/changeset/241566 >+ > 2019-02-14 Ross Kirsling <ross.kirsling@sony.com> > > [WTF] Add environment variable helpers >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 928f2a20722dd46102019e1c5990031ff4a33941..3e51a5b86b9c6c28979ce9ab7630081d085a47e4 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-15 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r241559 and r241566. >+ https://bugs.webkit.org/show_bug.cgi?id=194710 >+ >+ Causes layout test crashes under GuardMalloc (Requested by >+ ryanhaddad on #webkit). >+ >+ Reverted changesets: >+ >+ "[WTF] Add environment variable helpers" >+ https://bugs.webkit.org/show_bug.cgi?id=192405 >+ https://trac.webkit.org/changeset/241559 >+ >+ "Unreviewed build fix for WinCairo Debug after r241559." >+ https://trac.webkit.org/changeset/241566 >+ > 2019-02-15 Michael Catanzaro <mcatanzaro@igalia.com> > > [WPE][GTK] Defer sandboxing APIs to 2.26 >diff --git a/Source/WebKitLegacy/ios/ChangeLog b/Source/WebKitLegacy/ios/ChangeLog >index 26dbbaceece1f5022c800fd7a667db3992078183..65f2a4cfc3f30a8b0d11c5b6cb5f3e8995f3d556 100644 >--- a/Source/WebKitLegacy/ios/ChangeLog >+++ b/Source/WebKitLegacy/ios/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-15 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r241559 and r241566. >+ https://bugs.webkit.org/show_bug.cgi?id=194710 >+ >+ Causes layout test crashes under GuardMalloc (Requested by >+ ryanhaddad on #webkit). >+ >+ Reverted changesets: >+ >+ "[WTF] Add environment variable helpers" >+ https://bugs.webkit.org/show_bug.cgi?id=192405 >+ https://trac.webkit.org/changeset/241559 >+ >+ "Unreviewed build fix for WinCairo Debug after r241559." >+ https://trac.webkit.org/changeset/241566 >+ > 2019-02-14 Ross Kirsling <ross.kirsling@sony.com> > > [WTF] Add environment variable helpers >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 53b197bea99ff1d04cf71b83007931831d7a6d41..0c37a4fda502aaab1318452802472ee60e13efb8 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-15 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r241559 and r241566. >+ https://bugs.webkit.org/show_bug.cgi?id=194710 >+ >+ Causes layout test crashes under GuardMalloc (Requested by >+ ryanhaddad on #webkit). >+ >+ Reverted changesets: >+ >+ "[WTF] Add environment variable helpers" >+ https://bugs.webkit.org/show_bug.cgi?id=192405 >+ https://trac.webkit.org/changeset/241559 >+ >+ "Unreviewed build fix for WinCairo Debug after r241559." >+ https://trac.webkit.org/changeset/241566 >+ > 2019-02-15 Truitt Savell <tsavell@apple.com> > > Unreviewed, rolling out r241564. >diff --git a/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp b/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp >index 629d2e9d3f1012a7fa41e86ffe4f7157d335ab98..c075698bd9bf6e7048c0241cbff8327956272a83 100644 >--- a/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp >+++ b/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp >@@ -32,7 +32,6 @@ > #include "RemoteConnectionToTarget.h" > #include "RemoteInspectionTarget.h" > #include <gio/gio.h> >-#include <wtf/Environment.h> > #include <wtf/NeverDestroyed.h> > #include <wtf/RunLoop.h> > #include <wtf/glib/GUniquePtr.h> >@@ -52,7 +51,7 @@ RemoteInspector& RemoteInspector::singleton() > > RemoteInspector::RemoteInspector() > { >- if (Environment::get("WEBKIT_INSPECTOR_SERVER")) >+ if (g_getenv("WEBKIT_INSPECTOR_SERVER")) > start(); > } > >@@ -66,7 +65,7 @@ void RemoteInspector::start() > m_enabled = true; > m_cancellable = adoptGRef(g_cancellable_new()); > >- GUniquePtr<char> inspectorAddress(g_strdup(Environment::getRaw("WEBKIT_INSPECTOR_SERVER"))); >+ GUniquePtr<char> inspectorAddress(g_strdup(g_getenv("WEBKIT_INSPECTOR_SERVER"))); > char* portPtr = g_strrstr(inspectorAddress.get(), ":"); > ASSERT(portPtr); > *portPtr = '\0'; >@@ -80,7 +79,7 @@ void RemoteInspector::start() > if (GRefPtr<GDBusConnection> connection = adoptGRef(g_dbus_connection_new_for_address_finish(result, &error.outPtr()))) > inspector->setupConnection(WTFMove(connection)); > else if (!g_error_matches(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED)) >- g_warning("RemoteInspector failed to connect to inspector server at: %s: %s", Environment::getRaw("WEBKIT_INSPECTOR_SERVER"), error->message); >+ g_warning("RemoteInspector failed to connect to inspector server at: %s: %s", g_getenv("WEBKIT_INSPECTOR_SERVER"), error->message); > }, this); > } > >diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp >index 2da8f91becab72381586a4076b77b7c83e4c5afb..be0180605e6e8abf48ab711b86c9d4fc98c05f1a 100644 >--- a/Source/JavaScriptCore/jsc.cpp >+++ b/Source/JavaScriptCore/jsc.cpp >@@ -83,7 +83,6 @@ > #include <type_traits> > #include <wtf/Box.h> > #include <wtf/CommaPrinter.h> >-#include <wtf/Environment.h> > #include <wtf/MainThread.h> > #include <wtf/MemoryPressureHandler.h> > #include <wtf/MonotonicTime.h> >@@ -2251,11 +2250,9 @@ static double s_timeoutMultiplier = 1.0; > > static void startTimeoutThreadIfNeeded() > { >- if (auto timeoutString = Environment::get("JSCTEST_timeout")) { >- bool ok; >- s_desiredTimeout = timeoutString->toDouble(&ok); >- if (!ok) { >- dataLog("WARNING: timeout string is malformed, got ", *timeoutString, >+ if (char* timeoutString = getenv("JSCTEST_timeout")) { >+ if (sscanf(timeoutString, "%lf", &s_desiredTimeout) != 1) { >+ dataLog("WARNING: timeout string is malformed, got ", timeoutString, > " but expected a number. Not using a timeout.\n"); > } else { > Thread::create("jsc Timeout Thread", [] () { >diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp >index 84e8bb18a4d9ed074c1f79ee6fb80e465600128d..84d7326a24fbe5a5de03c5c38dbf2bdedf2360cb 100644 >--- a/Source/JavaScriptCore/runtime/Options.cpp >+++ b/Source/JavaScriptCore/runtime/Options.cpp >@@ -39,7 +39,6 @@ > #include <wtf/ASCIICType.h> > #include <wtf/Compiler.h> > #include <wtf/DataLog.h> >-#include <wtf/Environment.h> > #include <wtf/NumberOfCores.h> > #include <wtf/PointerPreparations.h> > #include <wtf/StdLibExtras.h> >@@ -177,7 +176,7 @@ bool overrideOptionWithHeuristic(T& variable, Options::ID id, const char* name, > bool available = (availability == Options::Availability::Normal) > || Options::isAvailable(id, availability); > >- const char* stringValue = Environment::getRaw(name); >+ const char* stringValue = getenv(name); > if (!stringValue) > return false; > >@@ -190,11 +189,12 @@ bool overrideOptionWithHeuristic(T& variable, Options::ID id, const char* name, > > bool Options::overrideAliasedOptionWithHeuristic(const char* name) > { >- const char* stringValue = Environment::getRaw(name); >+ const char* stringValue = getenv(name); > if (!stringValue) > return false; > >- auto aliasedOption = makeString(&name[4], "=", stringValue); >+ String aliasedOption; >+ aliasedOption = String(&name[4]) + "=" + stringValue; > if (Options::setOption(aliasedOption.utf8().data())) > return true; > >@@ -597,9 +597,9 @@ void Options::initialize() > > #if ASAN_ENABLED && OS(LINUX) && ENABLE(WEBASSEMBLY_FAST_MEMORY) > if (Options::useWebAssemblyFastMemory()) { >- auto asanOptions = Environment::get("ASAN_OPTIONS"); >+ const char* asanOptions = getenv("ASAN_OPTIONS"); > bool okToUseWebAssemblyFastMemory = asanOptions >- && asanOptions->contains("allow_user_segv_handler=1") || asanOptions->contains("handle_segv=0"); >+ && (strstr(asanOptions, "allow_user_segv_handler=1") || strstr(asanOptions, "handle_segv=0")); > if (!okToUseWebAssemblyFastMemory) { > dataLogLn("WARNING: ASAN interferes with JSC signal handlers; useWebAssemblyFastMemory will be disabled."); > Options::useWebAssemblyFastMemory() = false; >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index 79022d62181168273e0e688b9b19a645b4baec69..87ea244ba69268dfc698cce2380b788ea7aac374 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -149,7 +149,6 @@ > #include "WeakGCMapInlines.h" > #include "WebAssemblyFunction.h" > #include "WebAssemblyWrapperFunction.h" >-#include <wtf/Environment.h> > #include <wtf/ProcessID.h> > #include <wtf/ReadWriteLock.h> > #include <wtf/SimpleStats.h> >@@ -198,7 +197,8 @@ static bool enableAssembler(ExecutableAllocator& executableAllocator) > return false; > } > >- return !Environment::hasValue("JavaScriptCoreUseJIT", "0"); >+ char* canUseJITString = getenv("JavaScriptCoreUseJIT"); >+ return !canUseJITString || atoi(canUseJITString); > } > #endif // ENABLE(!ASSEMBLER) > >@@ -428,7 +428,8 @@ VM::VM(VMType vmType, HeapType heapType) > m_perBytecodeProfiler = std::make_unique<Profiler::Database>(*this); > > StringPrintStream pathOut; >- if (const char* profilerPath = Environment::getRaw("JSC_PROFILER_PATH")) >+ const char* profilerPath = getenv("JSC_PROFILER_PATH"); >+ if (profilerPath) > pathOut.print(profilerPath, "/"); > pathOut.print("JSCProfile-", getCurrentProcessID(), "-", m_perBytecodeProfiler->databaseID(), ".json"); > m_perBytecodeProfiler->registerToSaveAtExit(pathOut.toCString().data()); >diff --git a/Source/JavaScriptCore/tools/CodeProfiling.cpp b/Source/JavaScriptCore/tools/CodeProfiling.cpp >index f8ea799ca6833b5cc1d7ec885cc2f8158a4f2c73..94ebe8e2ca7e189f8f6d8d5f64d90f9d061c97df 100644 >--- a/Source/JavaScriptCore/tools/CodeProfiling.cpp >+++ b/Source/JavaScriptCore/tools/CodeProfiling.cpp >@@ -28,7 +28,6 @@ > > #include "CodeProfile.h" > #include "MachineContext.h" >-#include <wtf/Environment.h> > #include <wtf/MetaAllocator.h> > > #if HAVE(SIGNAL_H) >@@ -86,19 +85,21 @@ void CodeProfiling::sample(void* pc, void** framePointer) > void CodeProfiling::notifyAllocator(WTF::MetaAllocator* allocator) > { > // Check for JSC_CODE_PROFILING. >- auto codeProfilingMode = Environment::getUInt("JSC_CODE_PROFILING"); >+ const char* codeProfilingMode = getenv("JSC_CODE_PROFILING"); > if (!codeProfilingMode) > return; > >- // Check for a valid mode, currently 1, 2, or 3. >+ // Check for a valid mode, currently "1", "2", or "3". >+ if (!codeProfilingMode[0] || codeProfilingMode[1]) >+ return; > switch (*codeProfilingMode) { >- case 1: >+ case '1': > s_mode = Enabled; > break; >- case 2: >+ case '2': > s_mode = Verbose; > break; >- case 3: >+ case '3': > s_mode = VeryVerbose; > break; > default: >diff --git a/Source/WTF/WTF.xcodeproj/project.pbxproj b/Source/WTF/WTF.xcodeproj/project.pbxproj >index 7e5ae223bd779b4d11a085e4be10b3bc2aa3c9c8..e54641d892cbbba8ec8d580cc6cb807d11a4b598 100644 >--- a/Source/WTF/WTF.xcodeproj/project.pbxproj >+++ b/Source/WTF/WTF.xcodeproj/project.pbxproj >@@ -89,7 +89,6 @@ > 93934BD518A1F16900D0D6A1 /* StringViewCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93934BD418A1F16900D0D6A1 /* StringViewCF.cpp */; }; > 93F1993E19D7958D00C2390B /* StringView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F1993D19D7958D00C2390B /* StringView.cpp */; }; > 9BC70F05176C379D00101DEC /* AtomicStringTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BC70F04176C379D00101DEC /* AtomicStringTable.cpp */; }; >- A307FD29220CB4350021B62C /* EnvironmentPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A307FD28220CB4350021B62C /* EnvironmentPOSIX.cpp */; }; > A32D8FA521FFFAB400780662 /* ThreadingPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A32D8FA421FFFAB400780662 /* ThreadingPOSIX.cpp */; }; > A331D95B21F24992009F02AA /* FileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A331D95A21F24992009F02AA /* FileSystem.cpp */; }; > A331D95D21F249E4009F02AA /* FileSystemCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A331D95C21F249E4009F02AA /* FileSystemCF.cpp */; }; >@@ -438,8 +437,6 @@ > 9BC70F04176C379D00101DEC /* AtomicStringTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringTable.cpp; sourceTree = "<group>"; }; > 9BD8F40A176C2AD80002D865 /* AtomicStringTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AtomicStringTable.h; sourceTree = "<group>"; }; > 9C67C542589348E285B49699 /* IndexedContainerIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexedContainerIterator.h; sourceTree = "<group>"; }; >- A307FD28220CB4350021B62C /* EnvironmentPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EnvironmentPOSIX.cpp; sourceTree = "<group>"; }; >- A307FD2A220CB4490021B62C /* Environment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Environment.h; sourceTree = "<group>"; }; > A30D412C1F0DE0BA00B71954 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; }; > A30D412D1F0DE13F00B71954 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; }; > A32D8FA421FFFAB400780662 /* ThreadingPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadingPOSIX.cpp; sourceTree = "<group>"; }; >@@ -803,7 +800,6 @@ > A331D96321F24A2E009F02AA /* posix */ = { > isa = PBXGroup; > children = ( >- A307FD28220CB4350021B62C /* EnvironmentPOSIX.cpp */, > A331D96621F24ABD009F02AA /* FileSystemPOSIX.cpp */, > A3EE5C3921FFAC5E00FABD61 /* OSAllocatorPOSIX.cpp */, > A32D8FA421FFFAB400780662 /* ThreadingPOSIX.cpp */, >@@ -933,7 +929,6 @@ > FE05FAE61FDB214300093230 /* DumbPtrTraits.h */, > AD653DA82006B6C200D820D7 /* DumbValueTraits.h */, > 1AEA88E11D6BBCF400E5AD64 /* EnumTraits.h */, >- A307FD2A220CB4490021B62C /* Environment.h */, > AD7C434A1DD2A4A70026888B /* Expected.h */, > A8A4729F151A825A004123FF /* ExportMacros.h */, > 0F7C5FB51D885CF20044F5E2 /* FastBitVector.cpp */, >@@ -1031,6 +1026,8 @@ > A8A472CE151A825B004123FF /* MetaAllocator.h */, > A8A472CF151A825B004123FF /* MetaAllocatorHandle.h */, > FE7497ED209163060003565B /* MetaAllocatorPtr.h */, >+ 5FAD3AE121B9636600BEE178 /* URLHelpers.cpp */, >+ 5FAD3AE021B9636600BEE178 /* URLHelpers.h */, > 0F66B2821DC97BAB004A1D3F /* MonotonicTime.cpp */, > 0F66B2831DC97BAB004A1D3F /* MonotonicTime.h */, > FE8225301B2A1E5B00BA68FD /* NakedPtr.h */, >@@ -1178,8 +1175,6 @@ > 5CC0EE7121629F1800A1A842 /* URL.h */, > 5C1F0597216439940039302C /* URLHash.h */, > 5CC0EE772162A01000A1A842 /* URLHash.h */, >- 5FAD3AE121B9636600BEE178 /* URLHelpers.cpp */, >- 5FAD3AE021B9636600BEE178 /* URLHelpers.h */, > 5CC0EE7321629F1900A1A842 /* URLParser.cpp */, > 5CC0EE7221629F1900A1A842 /* URLParser.h */, > 7AFEC6B01EB22B5900DADE36 /* UUID.cpp */, >@@ -1525,7 +1520,6 @@ > A8A473B0151A825B004123FF /* double-conversion.cc in Sources */, > A8A473BA151A825B004123FF /* dtoa.cpp in Sources */, > 143DDE9620C8BC37007F76FA /* Entitlements.mm in Sources */, >- A307FD29220CB4350021B62C /* EnvironmentPOSIX.cpp in Sources */, > 50DE35F5215BB01500B979C7 /* ExternalStringImpl.cpp in Sources */, > A8A473B3151A825B004123FF /* fast-dtoa.cc in Sources */, > 0F7C5FB61D885CF20044F5E2 /* FastBitVector.cpp in Sources */, >@@ -1563,6 +1557,7 @@ > 5CC0EE8A2162BC2200A1A842 /* NSURLExtras.mm in Sources */, > A8A473F4151A825B004123FF /* NumberOfCores.cpp in Sources */, > 8348BA0E21FBC0D500FD3054 /* ObjectIdentifier.cpp in Sources */, >+ 5FAD3AE221B9636600BEE178 /* URLHelpers.cpp in Sources */, > A3EE5C3A21FFAC5F00FABD61 /* OSAllocatorPOSIX.cpp in Sources */, > A8A473F9151A825B004123FF /* OSRandomSource.cpp in Sources */, > A8A47402151A825B004123FF /* PageBlock.cpp in Sources */, >@@ -1619,7 +1614,6 @@ > 5CC0EE7621629F1900A1A842 /* URL.cpp in Sources */, > 5C1F0595216437B30039302C /* URLCF.cpp in Sources */, > 5CC0EE892162BC2200A1A842 /* URLCocoa.mm in Sources */, >- 5FAD3AE221B9636600BEE178 /* URLHelpers.cpp in Sources */, > 5CC0EE7521629F1900A1A842 /* URLParser.cpp in Sources */, > 1C181C8F1D307AB800F5FA16 /* UTextProvider.cpp in Sources */, > 1C181C911D307AB800F5FA16 /* UTextProviderLatin1.cpp in Sources */, >diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt >index 8104da3b8d9ca4b0c118f899ef99ebddf28652a0..1f12b79f86a5a6f59c522973e9500178d3aa1740 100644 >--- a/Source/WTF/wtf/CMakeLists.txt >+++ b/Source/WTF/wtf/CMakeLists.txt >@@ -55,7 +55,6 @@ set(WTF_PUBLIC_HEADERS > DumbPtrTraits.h > DumbValueTraits.h > EnumTraits.h >- Environment.h > Expected.h > ExportMacros.h > FastBitVector.h >diff --git a/Source/WTF/wtf/DataLog.cpp b/Source/WTF/wtf/DataLog.cpp >index 3bcdd1a153c13529f97113382f6b5d34363906f3..57f9eb20d428852f7d00661dd4c50b9fef326afd 100644 >--- a/Source/WTF/wtf/DataLog.cpp >+++ b/Source/WTF/wtf/DataLog.cpp >@@ -26,15 +26,14 @@ > #include "config.h" > #include <wtf/DataLog.h> > >-#include <mutex> > #include <stdarg.h> > #include <string.h> >-#include <thread> >-#include <wtf/Environment.h> > #include <wtf/FilePrintStream.h> > #include <wtf/LockedPrintStream.h> > #include <wtf/ProcessID.h> > #include <wtf/Threading.h> >+#include <mutex> >+#include <thread> > > #if OS(UNIX) || OS(DARWIN) > #include <unistd.h> >@@ -94,7 +93,7 @@ static void initializeLogFileOnce() > #elif defined(DATA_LOG_FILENAME) > filename = DATA_LOG_FILENAME; > #else >- filename = Environment::getRaw("WTF_DATA_LOG_FILENAME"); >+ filename = getenv("WTF_DATA_LOG_FILENAME"); > #endif > char actualFilename[maxPathLength + 1]; > >diff --git a/Source/WTF/wtf/Environment.h b/Source/WTF/wtf/Environment.h >deleted file mode 100644 >index bb9e5be6b4bc4ca7fc22870b036821261c55536a..0000000000000000000000000000000000000000 >--- a/Source/WTF/wtf/Environment.h >+++ /dev/null >@@ -1,83 +0,0 @@ >-/* >- * Copyright (C) 2019 Sony Interactive Entertainment Inc. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY >- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY >- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON >- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS >- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#pragma once >- >-#include <wtf/Optional.h> >-#include <wtf/text/WTFString.h> >- >-namespace WTF { >-namespace EnvironmentImpl { >- >-WTF_EXPORT_PRIVATE Optional<String> get(const String&); >- >-inline const char* getRaw(const String& variable) >-{ >- auto string = get(variable); >- return string ? string->utf8().data() : nullptr; >-} >- >-inline Optional<int> getInt(const String& variable) >-{ >- auto string = get(variable); >- if (!string) >- return WTF::nullopt; >- >- bool ok; >- auto value = string->toIntStrict(&ok); >- return ok ? makeOptional(value) : WTF::nullopt; >-} >- >-inline Optional<unsigned> getUInt(const String& variable) >-{ >- auto string = get(variable); >- if (!string) >- return WTF::nullopt; >- >- bool ok; >- auto value = string->toUIntStrict(&ok); >- return ok ? makeOptional(value) : WTF::nullopt; >-} >- >-inline bool hasValue(const String& variable, const String& expected) >-{ >- auto actual = get(variable); >- return actual && *actual == expected; >-} >- >-inline bool hasValueOtherThan(const String& variable, const String& expected) >-{ >- auto actual = get(variable); >- return actual && *actual != expected; >-} >- >-WTF_EXPORT_PRIVATE void set(const String& variable, const String& value); >-WTF_EXPORT_PRIVATE void setIfNotDefined(const String& variable, const String& value); >- >-WTF_EXPORT_PRIVATE void remove(const String&); >- >-} // namespace EnvironmentImpl >-} // namespace WTF >- >-namespace Environment = WTF::EnvironmentImpl; >diff --git a/Source/WTF/wtf/NumberOfCores.cpp b/Source/WTF/wtf/NumberOfCores.cpp >index 48a9cf22e428e0fe95e1a13aaf8a144d42c0a324..62fa65a04214eb917365e86747f963c84046c223 100644 >--- a/Source/WTF/wtf/NumberOfCores.cpp >+++ b/Source/WTF/wtf/NumberOfCores.cpp >@@ -27,7 +27,6 @@ > #include <wtf/NumberOfCores.h> > > #include <cstdio> >-#include <wtf/Environment.h> > > #if OS(DARWIN) > #include <sys/param.h> >@@ -50,16 +49,14 @@ int numberOfProcessorCores() > > if (s_numberOfCores > 0) > return s_numberOfCores; >- >- if (auto coresEnv = Environment::get("WTF_numberOfProcessorCores")) { >- bool ok; >- auto numberOfCores = coresEnv->toUIntStrict(&ok); >- if (ok) { >+ >+ if (const char* coresEnv = getenv("WTF_numberOfProcessorCores")) { >+ unsigned numberOfCores; >+ if (sscanf(coresEnv, "%u", &numberOfCores) == 1) { > s_numberOfCores = numberOfCores; > return s_numberOfCores; >- } >- >- fprintf(stderr, "WARNING: failed to parse WTF_numberOfProcessorCores=%s\n", coresEnv->utf8().data()); >+ } else >+ fprintf(stderr, "WARNING: failed to parse WTF_numberOfProcessorCores=%s\n", coresEnv); > } > > #if OS(DARWIN) >diff --git a/Source/WTF/wtf/PlatformGTK.cmake b/Source/WTF/wtf/PlatformGTK.cmake >index b55d0ec5703c0122147a5cbb258ea8d7107d8964..297d0fa2c78f3961b0f4c3e17193fba6e5e4a3f5 100644 >--- a/Source/WTF/wtf/PlatformGTK.cmake >+++ b/Source/WTF/wtf/PlatformGTK.cmake >@@ -28,7 +28,6 @@ list(APPEND WTF_SOURCES > glib/RunLoopGLib.cpp > glib/URLGLib.cpp > >- posix/EnvironmentPOSIX.cpp > posix/OSAllocatorPOSIX.cpp > posix/ThreadingPOSIX.cpp > >diff --git a/Source/WTF/wtf/PlatformJSCOnly.cmake b/Source/WTF/wtf/PlatformJSCOnly.cmake >index 1932a7ff6bb8280cb4d58dec475ab9e9bee2f2a9..3542fef6f90ee0a65891b3a37606545c9ac77c41 100644 >--- a/Source/WTF/wtf/PlatformJSCOnly.cmake >+++ b/Source/WTF/wtf/PlatformJSCOnly.cmake >@@ -8,7 +8,6 @@ if (WIN32) > > win/CPUTimeWin.cpp > win/DbgHelperWin.cpp >- win/EnvironmentWin.cpp > win/FileSystemWin.cpp > win/LanguageWin.cpp > win/MainThreadWin.cpp >@@ -34,7 +33,6 @@ else () > > generic/MainThreadGeneric.cpp > >- posix/EnvironmentPOSIX.cpp > posix/FileSystemPOSIX.cpp > posix/OSAllocatorPOSIX.cpp > posix/ThreadingPOSIX.cpp >diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake >index 339f2bb4b7cbda4538269ce4c2f9574a81bb1f0b..9a1f510b409f10e0232f1f1e0e2e2e59df14cb16 100644 >--- a/Source/WTF/wtf/PlatformMac.cmake >+++ b/Source/WTF/wtf/PlatformMac.cmake >@@ -64,7 +64,6 @@ list(APPEND WTF_SOURCES > mac/FileSystemMac.mm > mac/SchedulePairMac.mm > >- posix/EnvironmentPOSIX.cpp > posix/FileSystemPOSIX.cpp > posix/OSAllocatorPOSIX.cpp > posix/ThreadingPOSIX.cpp >diff --git a/Source/WTF/wtf/PlatformPlayStation.cmake b/Source/WTF/wtf/PlatformPlayStation.cmake >index fc4a29ff34a7574be68a5e8cee7c3b2b90e7381c..4b6919076f391051b85e39b06f215dc9ab458681 100644 >--- a/Source/WTF/wtf/PlatformPlayStation.cmake >+++ b/Source/WTF/wtf/PlatformPlayStation.cmake >@@ -5,7 +5,6 @@ list(APPEND WTF_SOURCES > generic/RunLoopGeneric.cpp > generic/WorkQueueGeneric.cpp > >- posix/EnvironmentPOSIX.cpp > posix/FileSystemPOSIX.cpp > posix/OSAllocatorPOSIX.cpp > posix/ThreadingPOSIX.cpp >diff --git a/Source/WTF/wtf/PlatformWPE.cmake b/Source/WTF/wtf/PlatformWPE.cmake >index eb5f739b2c3bd84fc85b5f1c165d24461a7a96fd..38e632c3ef8b3137aa9711990e71455fbaa032cc 100644 >--- a/Source/WTF/wtf/PlatformWPE.cmake >+++ b/Source/WTF/wtf/PlatformWPE.cmake >@@ -26,7 +26,6 @@ list(APPEND WTF_SOURCES > linux/MemoryFootprintLinux.cpp > linux/MemoryPressureHandlerLinux.cpp > >- posix/EnvironmentPOSIX.cpp > posix/OSAllocatorPOSIX.cpp > posix/ThreadingPOSIX.cpp > >diff --git a/Source/WTF/wtf/PlatformWin.cmake b/Source/WTF/wtf/PlatformWin.cmake >index f65e12155f0deba956d408bf4ef91ab1d2756541..2c34022549d8840eb9230284a1ddd9d285239aae 100644 >--- a/Source/WTF/wtf/PlatformWin.cmake >+++ b/Source/WTF/wtf/PlatformWin.cmake >@@ -12,7 +12,6 @@ list(APPEND WTF_SOURCES > > win/CPUTimeWin.cpp > win/DbgHelperWin.cpp >- win/EnvironmentWin.cpp > win/FileSystemWin.cpp > win/LanguageWin.cpp > win/MainThreadWin.cpp >diff --git a/Source/WTF/wtf/Threading.cpp b/Source/WTF/wtf/Threading.cpp >index a54575c4e766fc775dc8c7781a9d0ea3d473dbec..31e4ddc045ad3c76ab7c2cf8fa8f87d063ceb6ea 100644 >--- a/Source/WTF/wtf/Threading.cpp >+++ b/Source/WTF/wtf/Threading.cpp >@@ -285,18 +285,10 @@ void Thread::dump(PrintStream& out) const > ThreadSpecificKey Thread::s_key = InvalidThreadSpecificKey; > #endif > >-static bool initialized = false; >- >-bool threadingIsInitialized() >-{ >- return initialized; >-} >- > void initializeThreading() > { > static std::once_flag onceKey; > std::call_once(onceKey, [] { >- initialized = true; > initializeRandomNumberGenerator(); > #if !HAVE(FAST_TLS) > Thread::initializeTLSKey(); >diff --git a/Source/WTF/wtf/Threading.h b/Source/WTF/wtf/Threading.h >index eee53ae6f3f613ce57cc166ffb7f9a4a3c4f468d..2d9242ccab4bbd5fd098f900574b7e5220f72b09 100644 >--- a/Source/WTF/wtf/Threading.h >+++ b/Source/WTF/wtf/Threading.h >@@ -61,8 +61,6 @@ enum class ThreadGroupAddResult; > class ThreadGroup; > class PrintStream; > >-WTF_EXPORT_PRIVATE bool threadingIsInitialized(); >- > // This function can be called from any threads. > WTF_EXPORT_PRIVATE void initializeThreading(); > >diff --git a/Source/WTF/wtf/posix/EnvironmentPOSIX.cpp b/Source/WTF/wtf/posix/EnvironmentPOSIX.cpp >deleted file mode 100644 >index 35e72750f1ac6f527e3f273f760aa612bea68b24..0000000000000000000000000000000000000000 >--- a/Source/WTF/wtf/posix/EnvironmentPOSIX.cpp >+++ /dev/null >@@ -1,60 +0,0 @@ >-/* >- * Copyright (C) 2019 Sony Interactive Entertainment Inc. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY >- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY >- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON >- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS >- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include <wtf/Environment.h> >- >-#include <cstdlib> >-#include <wtf/Assertions.h> >-#include <wtf/Threading.h> >- >-namespace WTF { >-namespace EnvironmentImpl { >- >-Optional<String> get(const String& variable) >-{ >- auto value = getenv(variable.utf8().data()); >- return value ? makeOptional(String::fromUTF8(value)) : WTF::nullopt; >-} >- >-void set(const String& variable, const String& value) >-{ >- ASSERT(!WTF::threadingIsInitialized()); >- setenv(variable.utf8().data(), value.utf8().data(), 1); >-} >- >-void setIfNotDefined(const String& variable, const String& value) >-{ >- ASSERT(!WTF::threadingIsInitialized()); >- setenv(variable.utf8().data(), value.utf8().data(), 0); >-} >- >-void remove(const String& variable) >-{ >- ASSERT(!WTF::threadingIsInitialized()); >- unsetenv(variable.utf8().data()); >-} >- >-} // namespace EnvironmentImpl >-} // namespace WTF >diff --git a/Source/WTF/wtf/posix/FileSystemPOSIX.cpp b/Source/WTF/wtf/posix/FileSystemPOSIX.cpp >index dce9b37e9b0f5bf0f51751074bccd58e612d1ce1..70d2f98e4d72c2cd15994e9fa7f7a9bc4bf0af56 100644 >--- a/Source/WTF/wtf/posix/FileSystemPOSIX.cpp >+++ b/Source/WTF/wtf/posix/FileSystemPOSIX.cpp >@@ -40,7 +40,6 @@ > #include <sys/types.h> > #include <unistd.h> > #include <wtf/EnumTraits.h> >-#include <wtf/Environment.h> > #include <wtf/FileMetadata.h> > #include <wtf/text/CString.h> > #include <wtf/text/StringBuilder.h> >@@ -425,8 +424,8 @@ bool getVolumeFreeSpace(const String& path, uint64_t& freeSpace) > String openTemporaryFile(const String& prefix, PlatformFileHandle& handle) > { > char buffer[PATH_MAX]; >+ const char* tmpDir = getenv("TMPDIR"); > >- const char* tmpDir = Environment::getRaw("TMPDIR"); > if (!tmpDir) > tmpDir = "/tmp"; > >diff --git a/Source/WTF/wtf/win/EnvironmentWin.cpp b/Source/WTF/wtf/win/EnvironmentWin.cpp >deleted file mode 100644 >index a36b966606453ed46ccc25e02497aa124f20b2e3..0000000000000000000000000000000000000000 >--- a/Source/WTF/wtf/win/EnvironmentWin.cpp >+++ /dev/null >@@ -1,69 +0,0 @@ >-/* >- * Copyright (C) 2019 Sony Interactive Entertainment Inc. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY >- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY >- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON >- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS >- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include <wtf/Environment.h> >- >-#include <windows.h> >-#include <wtf/Assertions.h> >-#include <wtf/Threading.h> >-#include <wtf/Vector.h> >- >-namespace WTF { >-namespace EnvironmentImpl { >- >-Optional<String> get(const String& variable) >-{ >- auto rawVariable = variable.charactersWithNullTermination().data(); >- auto length = ::GetEnvironmentVariableW(rawVariable, nullptr, 0); >- if (!length) >- return WTF::nullopt; >- >- Vector<UChar> buffer(length); >- return ::GetEnvironmentVariableW(rawVariable, buffer.data(), length) ? makeOptional(String(buffer.data())) : WTF::nullopt; >-} >- >-void set(const String& variable, const String& value) >-{ >- ASSERT(!WTF::threadingIsInitialized()); >- ::SetEnvironmentVariableW(variable.charactersWithNullTermination().data(), value.charactersWithNullTermination().data()); >-} >- >-void setIfNotDefined(const String& variable, const String& value) >-{ >- ASSERT(!WTF::threadingIsInitialized()); >- if (get(variable)) >- return; >- >- set(variable, value); >-} >- >-void remove(const String& variable) >-{ >- ASSERT(!WTF::threadingIsInitialized()); >- ::SetEnvironmentVariableW(variable.charactersWithNullTermination().data(), nullptr); >-} >- >-} // namespace EnvironmentImpl >-} // namespace WTF >diff --git a/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp b/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >index a432bf79f4ffa204fe904a43c68ac4cb9248a3fc..24734f902c14ab1e8c922762c32f74de7481942e 100644 >--- a/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >+++ b/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >@@ -26,29 +26,26 @@ > #include "config.h" > #include "Logging.h" > >-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED >- >-#include <wtf/Environment.h> > #include <wtf/text/WTFString.h> > >+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED >+ > namespace PAL { > > String logLevelString() > { > #if !LOG_DISABLED >- auto logEnv = Environment::get("WEBKIT_DEBUG"); >- if (!logEnv) >- return emptyString(); >+ if (char* logEnv = getenv("WEBKIT_DEBUG")) { > > #if defined(NDEBUG) >- WTFLogAlways("WEBKIT_DEBUG is not empty, but this is a release build. Notice that many log messages will only appear in a debug build."); >+ WTFLogAlways("WEBCORE_DEBUG is not empty, but this is a release build. Notice that many log messages will only appear in a debug build."); > #endif > >- // To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1. >- return makeString("NotYetImplemented,", *logEnv); >-#else >- return String(); >+ // To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1. >+ return makeString("NotYetImplemented,"_s, logEnv); >+ } > #endif >+ return String(); > } > > } // namespace PAL >diff --git a/Source/WebCore/PAL/pal/win/LoggingWin.cpp b/Source/WebCore/PAL/pal/win/LoggingWin.cpp >index b68cc9460c8135aae7fe0b1dcd1b53f4cea74930..6b232c4db4876527c73595caf8d1669a93eae048 100644 >--- a/Source/WebCore/PAL/pal/win/LoggingWin.cpp >+++ b/Source/WebCore/PAL/pal/win/LoggingWin.cpp >@@ -29,7 +29,7 @@ > #if !LOG_DISABLED || !RELEASE_LOG_DISABLED > > #include <windows.h> >-#include <wtf/Environment.h> >+#include <wtf/StdLibExtras.h> > #include <wtf/text/WTFString.h> > > namespace PAL { >@@ -37,7 +37,17 @@ namespace PAL { > String logLevelString() > { > #if !LOG_DISABLED >- return Environment::get("WebCoreLogging").valueOr(emptyString()); >+ static char* const loggingEnvironmentVariable = "WebCoreLogging"; >+ DWORD length = GetEnvironmentVariableA(loggingEnvironmentVariable, 0, 0); >+ if (!length) >+ return emptyString(); >+ >+ Vector<char> buffer(length); >+ >+ if (!GetEnvironmentVariableA(loggingEnvironmentVariable, buffer.data(), length)) >+ return emptyString(); >+ >+ return String(buffer.data()); > #else > return String(); > #endif >diff --git a/Source/WebCore/platform/NotImplemented.h b/Source/WebCore/platform/NotImplemented.h >index 250d433078e7de7fbab8b880f58400ba2646c6a2..72af706d40e1279aea9ece08a6b77add486db151 100644 >--- a/Source/WebCore/platform/NotImplemented.h >+++ b/Source/WebCore/platform/NotImplemented.h >@@ -27,16 +27,15 @@ > #define NotImplemented_h > > #include <wtf/Assertions.h> >-#include <wtf/Environment.h> > > #if PLATFORM(GTK) >-#define suppressNotImplementedWarning() Environment::get("DISABLE_NI_WARNING") >+ #define suppressNotImplementedWarning() getenv("DISABLE_NI_WARNING") > #else >-#define suppressNotImplementedWarning() false >+ #define suppressNotImplementedWarning() false > #endif > > #if LOG_DISABLED >-#define notImplemented() ((void)0) >+ #define notImplemented() ((void)0) > #else > > namespace WebCore { >diff --git a/Source/WebCore/platform/cocoa/SystemVersion.mm b/Source/WebCore/platform/cocoa/SystemVersion.mm >index 3fac83db6616d745863cc14141fd105b61819072..d4c4f5a0d072203f8be800451f4a8a3c827fd916 100644 >--- a/Source/WebCore/platform/cocoa/SystemVersion.mm >+++ b/Source/WebCore/platform/cocoa/SystemVersion.mm >@@ -25,8 +25,6 @@ > #include "config.h" > #include "SystemVersion.h" > >-#include <wtf/Environment.h> >- > namespace WebCore { > > static NSString *createSystemMarketingVersion() >@@ -34,7 +32,7 @@ static NSString *createSystemMarketingVersion() > // Can't use -[NSProcessInfo operatingSystemVersionString] because it has too much stuff we don't want. > NSString *systemLibraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSSystemDomainMask, YES) objectAtIndex:0]; > #if PLATFORM(IOS_FAMILY_SIMULATOR) >- if (const char* simulatorRoot = Environment::getRaw("SIMULATOR_ROOT")) >+ if (char *simulatorRoot = getenv("SIMULATOR_ROOT")) > systemLibraryPath = [NSString stringWithFormat:@"%s/%@", simulatorRoot, systemLibraryPath]; > #endif > NSString *systemVersionPlistPath = [systemLibraryPath stringByAppendingPathComponent:@"CoreServices/SystemVersion.plist"]; >diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >index 29f23ba9b1388c0c2adcbcf5b6b0b5e109f94113..1fa4c4c87908d83a3aa7db3c0e8c54f085ab329a 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >@@ -29,7 +29,6 @@ > #include <gst/audio/audio-info.h> > #include <gst/gst.h> > #include <mutex> >-#include <wtf/Environment.h> > #include <wtf/glib/GLibUtilities.h> > #include <wtf/glib/GUniquePtr.h> > #include <wtf/glib/RunLoopSourcePriority.h> >@@ -238,7 +237,8 @@ bool initializeGStreamer(Optional<Vector<String>>&& options) > g_strfreev(argv); > > if (isFastMallocEnabled()) { >- if (!Environment::hasValue("WEBKIT_GST_DISABLE_FAST_MALLOC", "0")) >+ const char* disableFastMalloc = getenv("WEBKIT_GST_DISABLE_FAST_MALLOC"); >+ if (!disableFastMalloc || !strcmp(disableFastMalloc, "0")) > gst_allocator_set_default(GST_ALLOCATOR(g_object_new(gst_allocator_fast_malloc_get_type(), nullptr))); > } > >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >index 9e50cdc40dac032755c9212e88f6156cd19ab0b9..d458f1af795860c957709867a72616d334d2fa0f 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >@@ -42,7 +42,6 @@ > #include <gst/gst.h> > #include <gst/pbutils/missing-plugins.h> > #include <limits> >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > #include <wtf/HexNumber.h> > #include <wtf/MediaTime.h> >@@ -2418,7 +2417,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin(const gchar* playbinName, con > ASSERT(!m_pipeline); > > #if GST_CHECK_VERSION(1, 10, 0) >- if (Environment::get("USE_PLAYBIN3")) >+ if (g_getenv("USE_PLAYBIN3")) > playbinName = "playbin3"; > #else > playbinName = "playbin"; >diff --git a/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngine.cpp b/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngine.cpp >index 62632666b9276bf22d78f902e1d1612fc5bb329c..07ae7a263c05e8dd30ed95534676eae857e40c14 100644 >--- a/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngine.cpp >+++ b/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngine.cpp >@@ -31,17 +31,15 @@ > > #include "NicosiaPaintingEngineBasic.h" > #include "NicosiaPaintingEngineThreaded.h" >-#include <wtf/Environment.h> > > namespace Nicosia { > > std::unique_ptr<PaintingEngine> PaintingEngine::create() > { > #if ENABLE(DEVELOPER_MODE) && PLATFORM(WPE) >- if (auto numThreadsEnv = Environment::get("WEBKIT_NICOSIA_PAINTING_THREADS")) { >- bool ok; >- auto numThreads = numThreadsEnv->toIntStrict(&ok); >- if (ok) { >+ if (const char* numThreadsEnv = getenv("WEBKIT_NICOSIA_PAINTING_THREADS")) { >+ unsigned numThreads = 0; >+ if (sscanf(numThreadsEnv, "%u", &numThreads) == 1) { > if (numThreads < 1 || numThreads > 8) { > WTFLogAlways("The number of Nicosia painting threads is not between 1 and 8. Using the default value 4\n"); > numThreads = 4; >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp >index 6e519843e2771201bbb53b38b3b533728efd6e65..c8cac48c6c05ecb452157fb231eb64b698ca6f27 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp >@@ -20,10 +20,10 @@ > */ > > #include "config.h" >+ > #include "TextureMapperFPSCounter.h" > > #include "TextureMapper.h" >-#include <wtf/Environment.h> > #include <wtf/text/WTFString.h> > > namespace WebCore { >@@ -34,13 +34,12 @@ TextureMapperFPSCounter::TextureMapperFPSCounter() > , m_lastFPS(0) > , m_frameCount(0) > { >- if (auto showFPSEnvironment = Environment::get("WEBKIT_SHOW_FPS")) { >- bool ok; >- m_fpsInterval = Seconds(showFPSEnvironment->toDouble(&ok)); >- if (ok && m_fpsInterval) { >- m_isShowingFPS = true; >- m_fpsTimestamp = MonotonicTime::now(); >- } >+ String showFPSEnvironment = getenv("WEBKIT_SHOW_FPS"); >+ bool ok = false; >+ m_fpsInterval = Seconds(showFPSEnvironment.toDouble(&ok)); >+ if (ok && m_fpsInterval) { >+ m_isShowingFPS = true; >+ m_fpsTimestamp = MonotonicTime::now(); > } > } > >diff --git a/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp b/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp >index 86a065299bad0a18b1162f3b116ee063c1e52f34..8c81119bc50dbee90a861930220126ab1b0f6803 100644 >--- a/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp >+++ b/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp >@@ -27,7 +27,6 @@ > #include "PlatformDisplayX11.h" > > #include "GLContext.h" >-#include <wtf/Environment.h> > > #if PLATFORM(X11) > #include <X11/Xlib.h> >@@ -45,7 +44,7 @@ namespace WebCore { > > std::unique_ptr<PlatformDisplay> PlatformDisplayX11::create() > { >- Display* display = XOpenDisplay(Environment::getRaw("DISPLAY")); >+ Display* display = XOpenDisplay(getenv("DISPLAY")); > if (!display) > return nullptr; > >diff --git a/Source/WebCore/platform/gtk/RenderThemeWidget.cpp b/Source/WebCore/platform/gtk/RenderThemeWidget.cpp >index d85dca1853d105b9819315d382c085ec65b47385..b72c107c1c43c5c8c382360887493873e1eb213a 100644 >--- a/Source/WebCore/platform/gtk/RenderThemeWidget.cpp >+++ b/Source/WebCore/platform/gtk/RenderThemeWidget.cpp >@@ -28,7 +28,6 @@ > > #if GTK_CHECK_VERSION(3, 20, 0) > >-#include <wtf/Environment.h> > #include <wtf/HashMap.h> > #include <wtf/NeverDestroyed.h> > >@@ -110,7 +109,7 @@ RenderThemeScrollbar::RenderThemeScrollbar(GtkOrientation orientation, Mode mode > info.classList.append("horizontal"); > info.classList.append("bottom"); > } >- static bool usesOverlayScrollbars = !Environment::hasValue("GTK_OVERLAY_SCROLLING", "0"); >+ static bool usesOverlayScrollbars = g_strcmp0(g_getenv("GTK_OVERLAY_SCROLLING"), "0"); > if (usesOverlayScrollbars) > info.classList.append("overlay-indicator"); > if (mode == Mode::Full) >diff --git a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >index c3323b591ed8454575baf8c2a6a5f4c081ed3215..209af7b55dba4b1140964fd5ce1461095d03f20b 100644 >--- a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >+++ b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >@@ -35,7 +35,6 @@ > #include "Scrollbar.h" > #include <cstdlib> > #include <gtk/gtk.h> >-#include <wtf/Environment.h> > > namespace WebCore { > >@@ -56,7 +55,7 @@ static void themeChangedCallback() > ScrollbarThemeGtk::ScrollbarThemeGtk() > { > #if GTK_CHECK_VERSION(3, 20, 0) >- m_usesOverlayScrollbars = !Environment::hasValue("GTK_OVERLAY_SCROLLING", "0"); >+ m_usesOverlayScrollbars = g_strcmp0(g_getenv("GTK_OVERLAY_SCROLLING"), "0"); > #endif > static bool themeMonitorInitialized = false; > if (!themeMonitorInitialized) { >diff --git a/Source/WebCore/platform/network/curl/CurlContext.cpp b/Source/WebCore/platform/network/curl/CurlContext.cpp >index a2b8e8d49cd8d4c21aaa8fd3196f226be921679f..0ce1100c860363dd67642b7b47671999e2e0aa5e 100644 >--- a/Source/WebCore/platform/network/curl/CurlContext.cpp >+++ b/Source/WebCore/platform/network/curl/CurlContext.cpp >@@ -35,7 +35,6 @@ > #include "HTTPHeaderMap.h" > #include <NetworkLoadMetrics.h> > #include <mutex> >-#include <wtf/Environment.h> > #include <wtf/MainThread.h> > #include <wtf/NeverDestroyed.h> > #include <wtf/text/CString.h> >@@ -48,6 +47,36 @@ > > namespace WebCore { > >+class EnvironmentVariableReader { >+public: >+ const char* read(const char* name) { return ::getenv(name); } >+ bool defined(const char* name) { return read(name) != nullptr; } >+ >+ template<typename T> Optional<T> readAs(const char* name) >+ { >+ if (const char* valueStr = read(name)) { >+ T value; >+ if (sscanf(valueStr, sscanTemplate<T>(), &value) == 1) >+ return value; >+ } >+ >+ return WTF::nullopt; >+ } >+ >+private: >+ template<typename T> const char* sscanTemplate() >+ { >+ ASSERT_NOT_REACHED(); >+ return nullptr; >+ } >+}; >+ >+template<> >+constexpr const char* EnvironmentVariableReader::sscanTemplate<signed>() { return "%d"; } >+ >+template<> >+constexpr const char* EnvironmentVariableReader::sscanTemplate<unsigned>() { return "%u"; } >+ > // ALPN Protocol ID (RFC7301) https://tools.ietf.org/html/rfc7301 > static const ASCIILiteral httpVersion10 { "http/1.0"_s }; > static const ASCIILiteral httpVersion11 { "http/1.1"_s }; >@@ -65,31 +94,34 @@ CurlContext::CurlContext() > { > initShareHandle(); > >- if (auto value = Environment::getUInt("WEBKIT_CURL_DNS_CACHE_TIMEOUT")) >+ EnvironmentVariableReader envVar; >+ >+ if (auto value = envVar.readAs<unsigned>("WEBKIT_CURL_DNS_CACHE_TIMEOUT")) > m_dnsCacheTimeout = Seconds(*value); > >- if (auto value = Environment::getUInt("WEBKIT_CURL_CONNECT_TIMEOUT")) >+ if (auto value = envVar.readAs<unsigned>("WEBKIT_CURL_CONNECT_TIMEOUT")) > m_connectTimeout = Seconds(*value); > > long maxConnects { CurlDefaultMaxConnects }; > long maxTotalConnections { CurlDefaultMaxTotalConnections }; > long maxHostConnections { CurlDefaultMaxHostConnections }; > >- if (auto value = Environment::getInt("WEBKIT_CURL_MAXCONNECTS")) >+ if (auto value = envVar.readAs<signed>("WEBKIT_CURL_MAXCONNECTS")) > maxConnects = *value; > >- if (auto value = Environment::getInt("WEBKIT_CURL_MAX_TOTAL_CONNECTIONS")) >+ if (auto value = envVar.readAs<signed>("WEBKIT_CURL_MAX_TOTAL_CONNECTIONS")) > maxTotalConnections = *value; > >- if (auto value = Environment::getInt("WEBKIT_CURL_MAX_HOST_CONNECTIONS")) >+ if (auto value = envVar.readAs<signed>("WEBKIT_CURL_MAX_HOST_CONNECTIONS")) > maxHostConnections = *value; > > m_scheduler = std::make_unique<CurlRequestScheduler>(maxConnects, maxTotalConnections, maxHostConnections); > > #ifndef NDEBUG >- m_verbose = !!Environment::get("DEBUG_CURL"); >+ m_verbose = envVar.defined("DEBUG_CURL"); > >- if (const char* logFile = Environment::getRaw("CURL_LOG_FILE")) >+ auto logFile = envVar.read("CURL_LOG_FILE"); >+ if (logFile) > m_logFile = fopen(logFile, "a"); > #endif > } >diff --git a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp >index c33e9226d4343f3f4cf2acc3f9d7cde59eca8cbf..1ac4e02b7cb0752df22e6cbb38944f1acf861292 100644 >--- a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp >+++ b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp >@@ -35,7 +35,6 @@ > #include "CurlContext.h" > #include "NetworkingContext.h" > #include "ResourceHandle.h" >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > #include <wtf/MainThread.h> > #include <wtf/NeverDestroyed.h> >@@ -47,8 +46,9 @@ namespace WebCore { > static String defaultCookieJarPath() > { > static const char* defaultFileName = "cookie.jar.db"; >- if (auto cookieJarPath = Environment::get("CURL_COOKIE_JAR_PATH")) >- return *cookieJarPath; >+ char* cookieJarPath = getenv("CURL_COOKIE_JAR_PATH"); >+ if (cookieJarPath) >+ return cookieJarPath; > > #if PLATFORM(WIN) > return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), defaultFileName); >diff --git a/Source/WebCore/platform/network/playstation/CurlSSLHandlePlayStation.cpp b/Source/WebCore/platform/network/playstation/CurlSSLHandlePlayStation.cpp >index 844aa664d4eda0bd29b9ad688d79d9ba32829a53..3e1e28750c0f875ce4af17cb3c210eace7f4b1c1 100644 >--- a/Source/WebCore/platform/network/playstation/CurlSSLHandlePlayStation.cpp >+++ b/Source/WebCore/platform/network/playstation/CurlSSLHandlePlayStation.cpp >@@ -26,13 +26,15 @@ > #include "config.h" > #include "CurlSSLHandle.h" > >-#include <wtf/Environment.h> >- > namespace WebCore { > > static String getCACertPathEnv() > { >- return Environment::get("CURL_CA_BUNDLE_PATH").valueOr(emptyString()); >+ char* envPath = getenv("CURL_CA_BUNDLE_PATH"); >+ if (envPath) >+ return { envPath }; >+ >+ return emptyString(); > } > > void CurlSSLHandle::platformInitialize() >diff --git a/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp b/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp >index 395093f2c7eefe57fcb4a4cb209843209703f718..47c88bad948792e7c44162aa1650621e5d1f4c02 100644 >--- a/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp >+++ b/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp >@@ -26,8 +26,6 @@ > #include "config.h" > #include "CurlSSLHandle.h" > >-#include <wtf/Environment.h> >- > #if USE(CF) > #if OS(WINDOWS) > #include "WebCoreBundleWin.h" >@@ -40,8 +38,9 @@ namespace WebCore { > > static String getCACertPathEnv() > { >- if (auto envPath = Environment::get("CURL_CA_BUNDLE_PATH")) >- return *envPath; >+ char* envPath = getenv("CURL_CA_BUNDLE_PATH"); >+ if (envPath) >+ return String(envPath); > > #if USE(CF) > CFBundleRef webKitBundleRef = webKitBundle(); >diff --git a/Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp b/Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp >index 5650df4f907ce877fcba051d34818bab05128a8c..5eeb9bfa7400f7215c026c552d82aa38a763f942 100644 >--- a/Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp >+++ b/Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp >@@ -32,7 +32,6 @@ > #include <hyphen.h> > #include <limits> > #include <stdlib.h> >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > #include <wtf/HashMap.h> > #include <wtf/NeverDestroyed.h> >@@ -88,8 +87,8 @@ static void scanDirectoryForDictionaries(const char* directoryPath, HashMap<Atom > #if ENABLE(DEVELOPER_MODE) > static CString topLevelPath() > { >- if (auto topLevelDirectory = Environment::get("WEBKIT_TOP_LEVEL")) >- return topLevelDirectory->utf8(); >+ if (const char* topLevelDirectory = g_getenv("WEBKIT_TOP_LEVEL")) >+ return topLevelDirectory; > > // If the environment variable wasn't provided then assume we were built into > // WebKitBuild/Debug or WebKitBuild/Release. Obviously this will fail if the build >@@ -102,8 +101,9 @@ static CString topLevelPath() > > static CString webkitBuildDirectory() > { >- if (auto webkitOutputDir = Environment::get("WEBKIT_OUTPUTDIR")) >- return webkitOutputDir->utf8(); >+ const char* webkitOutputDir = g_getenv("WEBKIT_OUTPUTDIR"); >+ if (webkitOutputDir) >+ return webkitOutputDir; > > GUniquePtr<char> outputDir(g_build_filename(topLevelPath().data(), "WebKitBuild", nullptr)); > return outputDir.get(); >diff --git a/Source/WebCore/platform/unix/LoggingUnix.cpp b/Source/WebCore/platform/unix/LoggingUnix.cpp >index 0d1e5a0e59fc0aeb77a7cca4571c1a98ba850077..b72ad238fa21d6f35eabd741dbb501a9431cec76 100644 >--- a/Source/WebCore/platform/unix/LoggingUnix.cpp >+++ b/Source/WebCore/platform/unix/LoggingUnix.cpp >@@ -24,7 +24,7 @@ > > #if !LOG_DISABLED || !RELEASE_LOG_DISABLED > >-#include <wtf/Environment.h> >+#include <string.h> > #include <wtf/text/WTFString.h> > > namespace WebCore { >@@ -32,7 +32,7 @@ namespace WebCore { > String logLevelString() > { > #if !LOG_DISABLED >- auto logEnv = Environment::get("WEBKIT_DEBUG"); >+ char* logEnv = getenv("WEBKIT_DEBUG"); > if (!logEnv) > return emptyString(); > >@@ -42,7 +42,7 @@ String logLevelString() > #endif > > // To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1. >- return makeString("NotYetImplemented,", *logEnv); >+ return String("NotYetImplemented,") + logEnv; > #else > return String(); > #endif >diff --git a/Source/WebCore/platform/win/LoggingWin.cpp b/Source/WebCore/platform/win/LoggingWin.cpp >index c158ed760870788425ac2c4e86af433090e7afa3..e6c444ecac7a2f93fe290f332e0903dc4646da6e 100644 >--- a/Source/WebCore/platform/win/LoggingWin.cpp >+++ b/Source/WebCore/platform/win/LoggingWin.cpp >@@ -29,7 +29,7 @@ > #if !LOG_DISABLED || !RELEASE_LOG_DISABLED > > #include <windows.h> >-#include <wtf/Environment.h> >+#include <wtf/StdLibExtras.h> > #include <wtf/text/WTFString.h> > > namespace WebCore { >@@ -37,7 +37,17 @@ namespace WebCore { > String logLevelString() > { > #if !LOG_DISABLED >- return Environment::get("WebCoreLogging").valueOr(emptyString()); >+ static char* const loggingEnvironmentVariable = "WebCoreLogging"; >+ DWORD length = GetEnvironmentVariableA(loggingEnvironmentVariable, 0, 0); >+ if (!length) >+ return emptyString(); >+ >+ Vector<char> buffer(length); >+ >+ if (!GetEnvironmentVariableA(loggingEnvironmentVariable, buffer.data(), length)) >+ return emptyString(); >+ >+ return String(buffer.data()); > #else > return String(); > #endif >diff --git a/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp b/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp >index 95f9f6be2af7de5e8d130ced50641b9fc640db0d..736c01708a46698699a0839a71477e2a4a483da7 100644 >--- a/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp >+++ b/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp >@@ -23,10 +23,9 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#include "config.h" > #include "NetworkProcessMainUnix.h" > >-#include <wtf/Environment.h> >+#include <cstdlib> > > #if USE(GCRYPT) > #include <pal/crypto/gcrypt/Initialization.h> >@@ -44,7 +43,7 @@ int main(int argc, char** argv) > // overwrite this priority string if it's already set by the user. > // https://bugzilla.gnome.org/show_bug.cgi?id=738633 > // WARNING: This needs to be KEPT IN SYNC with WebProcessMain.cpp. >- Environment::setIfNotDefined("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128"); >+ setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0); > > #if USE(GCRYPT) > PAL::GCrypt::initialize(); >diff --git a/Source/WebKit/Platform/unix/EnvironmentUtilities.cpp b/Source/WebKit/Platform/unix/EnvironmentUtilities.cpp >index 93e43c28ea872c3298c487879126c28710cda5c3..bb80120fc22c4b29cfe446f8f4fefb46b6cfca3f 100644 >--- a/Source/WebKit/Platform/unix/EnvironmentUtilities.cpp >+++ b/Source/WebKit/Platform/unix/EnvironmentUtilities.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "EnvironmentUtilities.h" > >-#include <wtf/Environment.h> > #include <wtf/text/CString.h> > > namespace WebKit { >@@ -39,7 +38,8 @@ void stripValuesEndingWithString(const char* environmentVariable, const char* se > ASSERT(searchValue); > > // Grab the current value of the environment variable. >- auto environmentValue = const_cast<char*>(Environment::getRaw(environmentVariable)); >+ char* environmentValue = getenv(environmentVariable); >+ > if (!environmentValue || environmentValue[0] == '\0') > return; > >diff --git a/Source/WebKit/Platform/unix/LoggingUnix.cpp b/Source/WebKit/Platform/unix/LoggingUnix.cpp >index 09c1fcae62abfdd28ed49b9347e4f6692e44b689..5b17b3bd8de3f548bf7690c1893d99fe1eb6d022 100644 >--- a/Source/WebKit/Platform/unix/LoggingUnix.cpp >+++ b/Source/WebKit/Platform/unix/LoggingUnix.cpp >@@ -27,22 +27,19 @@ > #include "config.h" > #include "Logging.h" > >-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED >- >-#include <wtf/Environment.h> >-#include <wtf/text/WTFString.h> >- > namespace WebKit { > >+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED >+ > String logLevelString() > { > #if !LOG_DISABLED >- return Environment::get("WEBKIT_DEBUG").valueOr(emptyString()); >+ return getenv("WEBKIT_DEBUG"); > #else > return String(); > #endif > } > >-} // namespace WebKit >- > #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED >+ >+} >diff --git a/Source/WebKit/Platform/win/LoggingWin.cpp b/Source/WebKit/Platform/win/LoggingWin.cpp >index 31fd1beb2232639ad2e34f3dff56986e2698071c..69b0a5c910fbdaf3d38ffc2706a0e40f8204fe53 100644 >--- a/Source/WebKit/Platform/win/LoggingWin.cpp >+++ b/Source/WebKit/Platform/win/LoggingWin.cpp >@@ -30,7 +30,7 @@ > #if !LOG_DISABLED || !RELEASE_LOG_DISABLED > > #include <windows.h> >-#include <wtf/Environment.h> >+#include <wtf/StdLibExtras.h> > #include <wtf/text/WTFString.h> > > namespace WebKit { >@@ -38,7 +38,18 @@ namespace WebKit { > String logLevelString() > { > #if !LOG_DISABLED >- return Environment::get("WebKitLogging").valueOr(emptyString()); >+ static char* const loggingEnvironmentVariable = "WebKitLogging"; >+ >+ DWORD length = GetEnvironmentVariableA(loggingEnvironmentVariable, 0, 0); >+ if (!length) >+ return emptyString(); >+ >+ Vector<char> buffer(length); >+ >+ if (!GetEnvironmentVariableA(loggingEnvironmentVariable, buffer.data(), length)) >+ return emptyString(); >+ >+ return String(buffer.data()); > #else > return String(); > #endif >diff --git a/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm b/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm >index 8d14144186c2c5a8d68b56de9c7bac14226d60ed..1054e4303a5ae61bcb45a6f383be14c8592d1742 100644 >--- a/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm >+++ b/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm >@@ -53,7 +53,6 @@ > #import <pal/spi/mac/NSApplicationSPI.h> > #import <pal/spi/mac/NSWindowSPI.h> > #import <sysexits.h> >-#import <wtf/Environment.h> > #import <wtf/HashSet.h> > #import <wtf/NeverDestroyed.h> > >@@ -169,8 +168,10 @@ static bool shouldCallRealDebugger() > static bool isUserbreakSet = false; > static dispatch_once_t flag; > dispatch_once(&flag, ^{ >- if (auto var = Environment::getInt("USERBREAK")) >- isUserbreakSet = *var; >+ char* var = getenv("USERBREAK"); >+ >+ if (var) >+ isUserbreakSet = atoi(var); > }); > > return isUserbreakSet; >diff --git a/Source/WebKit/Shared/Plugins/unix/PluginSearchPath.cpp b/Source/WebKit/Shared/Plugins/unix/PluginSearchPath.cpp >index 3db3fd12aa55d57aa4acd71eb24f671565af4afa..2bd549a95dfa675ce47f56d78a59b4f7315a11ab 100644 >--- a/Source/WebKit/Shared/Plugins/unix/PluginSearchPath.cpp >+++ b/Source/WebKit/Shared/Plugins/unix/PluginSearchPath.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "PluginSearchPath.h" > >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > > namespace WebKit { >@@ -37,15 +36,15 @@ Vector<String> pluginsDirectories() > Vector<String> result; > > #if ENABLE(NETSCAPE_PLUGIN_API) >- auto mozillaPaths = Environment::get("MOZ_PLUGIN_PATH"); >- if (mozillaPaths && !mozillaPaths->isEmpty()) { >- Vector<String> paths = mozillaPaths->split(':'); >+ String mozillaPaths(getenv("MOZ_PLUGIN_PATH")); >+ if (!mozillaPaths.isEmpty()) { >+ Vector<String> paths = mozillaPaths.split(':'); > result.appendVector(paths); > } > >- auto mozillaHome = Environment::get("MOZILLA_HOME"); >- if (mozillaHome && !mozillaHome->isEmpty()) >- result.append(*mozillaHome + "/plugins"); >+ String mozillaHome(getenv("MOZILLA_HOME")); >+ if (!mozillaHome.isEmpty()) >+ result.append(mozillaHome + "/plugins"); > > result.append(FileSystem::homeDirectoryPath() + "/.mozilla/plugins"); > result.append(FileSystem::homeDirectoryPath() + "/.netscape/plugins"); >diff --git a/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp b/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp >index a29cd02a72023d39cf008c010057d677c98d8db9..4ff35d31de1d57231a6f6e1015a855d40f8c8c35 100644 >--- a/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp >+++ b/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp >@@ -28,7 +28,6 @@ > #include "ProcessExecutablePath.h" > > #include <glib.h> >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > #include <wtf/glib/GLibUtilities.h> > >@@ -47,9 +46,9 @@ static String getExecutablePath() > static String findWebKitProcess(const char* processName) > { > #if ENABLE(DEVELOPER_MODE) >- static auto execDirectory = Environment::get("WEBKIT_EXEC_PATH"); >+ static const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH"); > if (execDirectory) { >- String processPath = FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(execDirectory->utf8().data()), processName); >+ String processPath = FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(execDirectory), processName); > if (FileSystem::fileExists(processPath)) > return processPath; > } >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp b/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp >index a4119f0e632b32ebcc9f73f16cb2b749158d62c6..03654dd0481eb7f357eca537f69813eb2803349b 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp >@@ -40,7 +40,6 @@ > #include <WebCore/UserAgent.h> > #include <cmath> > #include <glib/gi18n-lib.h> >-#include <wtf/Environment.h> > #include <wtf/glib/WTFGType.h> > #include <wtf/text/CString.h> > >@@ -184,7 +183,7 @@ static void webKitSettingsConstructed(GObject* object) > WebPreferences* prefs = settings->priv->preferences.get(); > prefs->setShouldRespectImageOrientation(true); > >- if (Environment::get("WEBKIT_WEBRTC_DISABLE_UNIFIED_PLAN")) >+ if (g_getenv("WEBKIT_WEBRTC_DISABLE_UNIFIED_PLAN")) > prefs->setWebRTCUnifiedPlanEnabled(FALSE); > > bool mediaStreamEnabled = prefs->mediaStreamEnabled(); >@@ -336,7 +335,8 @@ static void webKitSettingsSetProperty(GObject* object, guint propId, const GValu > if (g_value_get_boolean(value)) > webkit_settings_set_draw_compositing_indicators(settings, g_value_get_boolean(value)); > else { >- auto showDebugVisuals = Environment::hasValue("WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS", "1"); >+ char* debugVisualsEnvironment = getenv("WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS"); >+ bool showDebugVisuals = debugVisualsEnvironment && !strcmp(debugVisualsEnvironment, "1"); > webkit_settings_set_draw_compositing_indicators(settings, showDebugVisuals); > } > break; >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >index 7c62d4c38278216df0b1d4ec9f1f4eacf6fede7d..1ecbf3803e5e405d5176f9351d923e8cd1734327 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >@@ -57,7 +57,6 @@ > #include <glib/gi18n-lib.h> > #include <libintl.h> > #include <memory> >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > #include <wtf/HashMap.h> > #include <wtf/Language.h> >@@ -262,7 +261,7 @@ WEBKIT_DEFINE_TYPE(WebKitWebContext, webkit_web_context, G_TYPE_OBJECT) > static const char* injectedBundleDirectory() > { > #if ENABLE(DEVELOPER_MODE) >- const char* bundleDirectory = Environment::getRaw("WEBKIT_INJECTED_BUNDLE_PATH"); >+ const char* bundleDirectory = g_getenv("WEBKIT_INJECTED_BUNDLE_PATH"); > if (bundleDirectory && g_file_test(bundleDirectory, G_FILE_TEST_IS_DIR)) > return bundleDirectory; > #endif >@@ -360,7 +359,7 @@ static void webkitWebContextConstructed(GObject* object) > priv->processPool->setIgnoreTLSErrors(false); > > #if ENABLE(MEMORY_SAMPLER) >- if (Environment::get("WEBKIT_SAMPLE_MEMORY")) >+ if (getenv("WEBKIT_SAMPLE_MEMORY")) > priv->processPool->startMemorySampler(0); > #endif > >diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp >index e9de041adeb7488b25fd61a0ed726bdafbe5ac3c..8cafc7b18faa7cbeb7e0ad2cbcb02f1dc7da249a 100644 >--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp >+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp >@@ -29,7 +29,6 @@ > #include <WebCore/PlatformScreen.h> > #include <glib/gi18n-lib.h> > #include <gtk/gtk.h> >-#include <wtf/Environment.h> > > gboolean webkitWebViewAuthenticate(WebKitWebView* webView, WebKitAuthenticationRequest* request) > { >@@ -195,7 +194,8 @@ void webkitWebViewMaximizeWindow(WebKitWebView* view, CompletionHandler<void()>& > #if ENABLE(DEVELOPER_MODE) > // Xvfb doesn't support maximize, so we resize the window to the screen size. > if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11) { >- if (Environment::hasValue("UNDER_XVFB", "yes")) { >+ const char* underXvfb = g_getenv("UNDER_XVFB"); >+ if (!g_strcmp0(underXvfb, "yes")) { > auto screenRect = WebCore::screenAvailableRect(nullptr); > gtk_window_move(window, screenRect.x(), screenRect.y()); > gtk_window_resize(window, screenRect.width(), screenRect.height()); >@@ -247,7 +247,8 @@ void webkitWebViewRestoreWindow(WebKitWebView* view, CompletionHandler<void()>&& > #if ENABLE(DEVELOPER_MODE) > // Xvfb doesn't support maximize, so we resize the window to the default size. > if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11) { >- if (Environment::hasValue("UNDER_XVFB", "yes")) { >+ const char* underXvfb = g_getenv("UNDER_XVFB"); >+ if (!g_strcmp0(underXvfb, "yes")) { > int x, y; > gtk_window_get_default_size(window, &x, &y); > gtk_window_resize(window, x, y); >diff --git a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp >index d39eb77e8a42d146d3340c2f1c9436df86036df2..eb13b43eb02aa76e93b1a1d99400339bec407200 100644 >--- a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp >+++ b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp >@@ -36,7 +36,6 @@ > #include "WebPageGroup.h" > #include "WebProcessPool.h" > #include <wpe/wpe.h> >-#include <wtf/Environment.h> > > using namespace WebKit; > >@@ -71,7 +70,7 @@ View::View(struct wpe_view_backend* backend, const API::PageConfiguration& baseC > m_pageProxy = pool->createWebPage(*m_pageClient, WTFMove(configuration)); > > #if ENABLE(MEMORY_SAMPLER) >- if (Environment::get("WEBKIT_SAMPLE_MEMORY")) >+ if (getenv("WEBKIT_SAMPLE_MEMORY")) > pool->startMemorySampler(0); > #endif > >diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp >index ffa034a132fc5146ec798af174e0e5896429fb74..ca3789dde6ad06212603b807fa9d241dcbba3bbc 100644 >--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp >@@ -27,7 +27,6 @@ > #include "AuxiliaryProcessProxy.h" > > #include "AuxiliaryProcessMessages.h" >-#include <wtf/Environment.h> > #include <wtf/RunLoop.h> > > namespace WebKit { >@@ -52,8 +51,8 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau > { > launchOptions.processIdentifier = m_processIdentifier; > >- if (auto userDirectorySuffix = Environment::get("DIRHELPER_USER_DIR_SUFFIX")) >- launchOptions.extraInitializationData.add("user-directory-suffix"_s, *userDirectorySuffix); >+ if (const char* userDirectorySuffix = getenv("DIRHELPER_USER_DIR_SUFFIX")) >+ launchOptions.extraInitializationData.add("user-directory-suffix"_s, userDirectorySuffix); > > if (m_alwaysRunsAtBackgroundPriority) > launchOptions.extraInitializationData.add("always-runs-at-background-priority"_s, "true"); >@@ -77,9 +76,9 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau > ASSERT_NOT_REACHED(); > break; > } >- auto processCmdPrefix = Environment::get(varname); >- if (processCmdPrefix && !processCmdPrefix->isEmpty()) >- launchOptions.processCmdPrefix = *processCmdPrefix; >+ const char* processCmdPrefix = getenv(varname); >+ if (processCmdPrefix && *processCmdPrefix) >+ launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix); > #endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) > > platformGetLaunchOptions(launchOptions); >diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp >index 4f8a466bcf50a64109aab309de111e3146611213..f8b102a68e971cc34d3d914e84d2a4ac42f28221 100644 >--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp >+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp >@@ -25,7 +25,6 @@ > #include <glib.h> > #include <seccomp.h> > #include <sys/ioctl.h> >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > #include <wtf/glib/GLibUtilities.h> > #include <wtf/glib/GRefPtr.h> >@@ -166,7 +165,7 @@ public: > syncFdStr.get(), > }; > >- if (Environment::hasValue("WEBKIT_ENABLE_DBUS_PROXY_LOGGING", "1")) >+ if (!g_strcmp0(g_getenv("WEBKIT_ENABLE_DBUS_PROXY_LOGGING"), "1")) > proxyArgs.append("--log"); > > proxyArgs.appendVector(m_permissions); >@@ -283,7 +282,7 @@ static void bindIfExists(Vector<CString>& args, const char* path, BindFlags bind > static void bindDBusSession(Vector<CString>& args, XDGDBusProxyLauncher& proxy) > { > if (!proxy.isRunning()) >- proxy.setAddress(Environment::getRaw("DBUS_SESSION_BUS_ADDRESS"), DBusAddressType::Normal); >+ proxy.setAddress(g_getenv("DBUS_SESSION_BUS_ADDRESS"), DBusAddressType::Normal); > > if (proxy.proxyPath().data()) { > args.appendVector(Vector<CString>({ >@@ -294,25 +293,25 @@ static void bindDBusSession(Vector<CString>& args, XDGDBusProxyLauncher& proxy) > > static void bindX11(Vector<CString>& args) > { >- const char* display = Environment::getRaw("DISPLAY"); >+ const char* display = g_getenv("DISPLAY"); > if (!display || display[0] != ':' || !g_ascii_isdigit(const_cast<char*>(display)[1])) > display = ":0"; > GUniquePtr<char> x11File(g_strdup_printf("/tmp/.X11-unix/X%s", display + 1)); > bindIfExists(args, x11File.get(), BindFlags::ReadWrite); > >- if (const char* xauth = Environment::getRaw("XAUTHORITY")) >- bindIfExists(args, xauth); >- else { >+ const char* xauth = g_getenv("XAUTHORITY"); >+ if (!xauth) { > const char* homeDir = g_get_home_dir(); > GUniquePtr<char> xauthFile(g_build_filename(homeDir, ".Xauthority", nullptr)); > bindIfExists(args, xauthFile.get()); >- } >+ } else >+ bindIfExists(args, xauth); > } > > #if PLATFORM(WAYLAND) && USE(EGL) > static void bindWayland(Vector<CString>& args) > { >- const char* display = Environment::getRaw("WAYLAND_DISPLAY"); >+ const char* display = g_getenv("WAYLAND_DISPLAY"); > if (!display) > display = "wayland-0"; > >@@ -326,7 +325,8 @@ static void bindPulse(Vector<CString>& args) > { > // FIXME: The server can be defined in config files we'd have to parse. > // They can also be set as X11 props but that is getting a bit ridiculous. >- if (const char* pulseServer = Environment::getRaw("PULSE_SERVER")) { >+ const char* pulseServer = g_getenv("PULSE_SERVER"); >+ if (pulseServer) { > if (g_str_has_prefix(pulseServer, "unix:")) > bindIfExists(args, pulseServer + 5, BindFlags::ReadWrite); > // else it uses tcp >@@ -336,7 +336,8 @@ static void bindPulse(Vector<CString>& args) > bindIfExists(args, pulseRuntimeDir.get(), BindFlags::ReadWrite); > } > >- if (const char* pulseConfig = Environment::getRaw("PULSE_CLIENTCONFIG")) >+ const char* pulseConfig = g_getenv("PULSE_CLIENTCONFIG"); >+ if (pulseConfig) > bindIfExists(args, pulseConfig); > > const char* configDir = g_get_user_config_dir(); >@@ -449,7 +450,7 @@ static void bindA11y(Vector<CString>& args) > > static bool bindPathVar(Vector<CString>& args, const char* varname) > { >- const char* pathValue = Environment::getRaw(varname); >+ const char* pathValue = g_getenv(varname); > if (!pathValue) > return false; > >@@ -476,8 +477,8 @@ static void bindGStreamerData(Vector<CString>& args) > bindIfExists(args, gstCache.get(), BindFlags::ReadWrite); > > // /usr/lib is already added so this is only requried for other dirs >- const char* scannerPath = Environment::getRaw("GST_PLUGIN_SCANNER") ?: "/usr/libexec/gstreamer-1.0/gst-plugin-scanner"; >- const char* helperPath = Environment::getRaw("GST_INSTALL_PLUGINS_HELPER ") ?: "/usr/libexec/gst-install-plugins-helper"; >+ const char* scannerPath = g_getenv("GST_PLUGIN_SCANNER") ?: "/usr/libexec/gstreamer-1.0/gst-plugin-scanner"; >+ const char* helperPath = g_getenv("GST_INSTALL_PLUGINS_HELPER ") ?: "/usr/libexec/gst-install-plugins-helper"; > > bindIfExists(args, scannerPath); > bindIfExists(args, helperPath); >@@ -719,12 +720,12 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces > // We would have to parse ld config files for more info. > bindPathVar(sandboxArgs, "LD_LIBRARY_PATH"); > >- auto libraryPath = Environment::get("LD_LIBRARY_PATH"); >- if (libraryPath && !libraryPath->isEmpty()) { >+ const char* libraryPath = g_getenv("LD_LIBRARY_PATH"); >+ if (libraryPath && libraryPath[0]) { > // On distros using a suid bwrap it drops this env var > // so we have to pass it through to the children. > sandboxArgs.appendVector(Vector<CString>({ >- "--setenv", "LD_LIBRARY_PATH", libraryPath->utf8(), >+ "--setenv", "LD_LIBRARY_PATH", libraryPath, > })); > } > >@@ -803,8 +804,9 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces > } > > #if ENABLE(DEVELOPER_MODE) >- if (auto execDirectory = Environment::get("WEBKIT_EXEC_PATH")) { >- auto parentDir = FileSystem::directoryName(FileSystem::stringFromFileSystemRepresentation(execDirectory->utf8().data())); >+ const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH"); >+ if (execDirectory) { >+ String parentDir = FileSystem::directoryName(FileSystem::stringFromFileSystemRepresentation(execDirectory)); > bindIfExists(sandboxArgs, parentDir.utf8().data()); > } > >diff --git a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >index 58022e102909bbdaec0cc8087d7dda3be9409065..0c39073fe1de7adaf5312683d816462f64d3ec6f 100644 >--- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >+++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >@@ -34,7 +34,6 @@ > #include <errno.h> > #include <fcntl.h> > #include <glib.h> >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > #include <wtf/RunLoop.h> > #include <wtf/UniStdExtras.h> >@@ -166,10 +165,11 @@ void ProcessLauncher::launchProcess() > GUniqueOutPtr<GError> error; > GRefPtr<GSubprocess> process; > #if OS(LINUX) >+ const char* sandboxEnv = g_getenv("WEBKIT_FORCE_SANDBOX"); > bool sandboxEnabled = m_launchOptions.extraInitializationData.get("enable-sandbox") == "true"; > >- if (auto sandboxEnv = Environment::get("WEBKIT_FORCE_SANDBOX")) >- sandboxEnabled = *sandboxEnv == "1"; >+ if (sandboxEnv) >+ sandboxEnabled = !strcmp(sandboxEnv, "1"); > > if (sandboxEnabled && isInsideFlatpak()) > process = flatpakSpawn(launcher.get(), m_launchOptions, argv, socketPair.client, &error.outPtr()); >diff --git a/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm b/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >index 933f522e063e39542778d168b6a8a0bb52f65daf..8964df3a2e13e968012684b7b72054b8adc0a20b 100644 >--- a/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >+++ b/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >@@ -34,7 +34,6 @@ > #import <spawn.h> > #import <sys/param.h> > #import <sys/stat.h> >-#import <wtf/Environment.h> > #import <wtf/MachSendRight.h> > #import <wtf/RunLoop.h> > #import <wtf/SoftLinking.h> >@@ -85,7 +84,7 @@ static NSString *systemDirectoryPath() > { > static NSString *path = [^{ > #if PLATFORM(IOS_FAMILY_SIMULATOR) >- const char* simulatorRoot = Environment::getRaw("SIMULATOR_ROOT"); >+ char *simulatorRoot = getenv("SIMULATOR_ROOT"); > return simulatorRoot ? [NSString stringWithFormat:@"%s/System/", simulatorRoot] : @"/System/"; > #else > return @"/System/"; >@@ -119,11 +118,11 @@ void ProcessLauncher::launchProcess() > #if PLATFORM(IOS_FAMILY) > // Clients that set these environment variables explicitly do not have the values automatically forwarded by libxpc. > auto containerEnvironmentVariables = adoptOSObject(xpc_dictionary_create(nullptr, nullptr, 0)); >- if (const char* environmentHOME = Environment::getRaw("HOME")) >+ if (const char* environmentHOME = getenv("HOME")) > xpc_dictionary_set_string(containerEnvironmentVariables.get(), "HOME", environmentHOME); >- if (const char* environmentCFFIXED_USER_HOME = Environment::getRaw("CFFIXED_USER_HOME")) >+ if (const char* environmentCFFIXED_USER_HOME = getenv("CFFIXED_USER_HOME")) > xpc_dictionary_set_string(containerEnvironmentVariables.get(), "CFFIXED_USER_HOME", environmentCFFIXED_USER_HOME); >- if (const char* environmentTMPDIR = Environment::getRaw("TMPDIR")) >+ if (const char* environmentTMPDIR = getenv("TMPDIR")) > xpc_dictionary_set_string(containerEnvironmentVariables.get(), "TMPDIR", environmentTMPDIR); > xpc_dictionary_set_value(initializationMessage.get(), "ContainerEnvironmentVariables", containerEnvironmentVariables.get()); > #endif >diff --git a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp >index 8cc3c9612683e6ab2af3f7a4e36cac5b5dbfdf7a..a2a160be6864abddd46d78994bae00c6dcd50287 100644 >--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp >+++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp >@@ -32,7 +32,6 @@ > #include "WebProcessCreationParameters.h" > #include <JavaScriptCore/RemoteInspectorServer.h> > #include <WebCore/GStreamerCommon.h> >-#include <wtf/Environment.h> > #include <wtf/glib/GUniquePtr.h> > > namespace WebKit { >@@ -63,13 +62,14 @@ static void initializeRemoteInspectorServer(const char* address) > > static bool memoryPressureMonitorDisabled() > { >- return Environment::hasValue("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR", "1"); >+ static const char* disableMemoryPressureMonitor = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR"); >+ return disableMemoryPressureMonitor && !strcmp(disableMemoryPressureMonitor, "1"); > } > > void WebProcessPool::platformInitialize() > { > #if ENABLE(REMOTE_INSPECTOR) >- if (const char* address = Environment::getRaw("WEBKIT_INSPECTOR_SERVER")) >+ if (const char* address = g_getenv("WEBKIT_INSPECTOR_SERVER")) > initializeRemoteInspectorServer(address); > #endif > >@@ -89,7 +89,8 @@ void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& > #if PLATFORM(GTK) > // This is misnamed. It can only be used to disable complex text. > parameters.shouldAlwaysUseComplexTextCodePath = true; >- if (Environment::hasValue("WEBKIT_FORCE_COMPLEX_TEXT", "0")) >+ const char* forceComplexText = getenv("WEBKIT_FORCE_COMPLEX_TEXT"); >+ if (forceComplexText && !strcmp(forceComplexText, "0")) > parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath; > #endif > >diff --git a/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp b/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp >index 7366ea33e96ff1caf9561667b3d685e1532ca27e..45760eeeed9ff4cce74ccdd7278d7cfd7f5ecea7 100644 >--- a/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp >+++ b/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp >@@ -29,7 +29,6 @@ > #include "WaylandCompositor.h" > #include <WebCore/NotImplemented.h> > #include <WebCore/PlatformDisplay.h> >-#include <wtf/Environment.h> > > #if USE(REDIRECTED_XCOMPOSITE_WINDOW) > #include <WebCore/PlatformDisplayX11.h> >@@ -53,7 +52,8 @@ HardwareAccelerationManager::HardwareAccelerationManager() > return; > #endif > >- if (Environment::hasValueOtherThan("WEBKIT_DISABLE_COMPOSITING_MODE", "0")) { >+ const char* disableCompositing = getenv("WEBKIT_DISABLE_COMPOSITING_MODE"); >+ if (disableCompositing && strcmp(disableCompositing, "0")) { > m_canUseHardwareAcceleration = false; > return; > } >@@ -78,7 +78,8 @@ HardwareAccelerationManager::HardwareAccelerationManager() > } > #endif > >- if (Environment::hasValueOtherThan("WEBKIT_FORCE_COMPOSITING_MODE", "0")) >+ const char* forceCompositing = getenv("WEBKIT_FORCE_COMPOSITING_MODE"); >+ if (forceCompositing && strcmp(forceCompositing, "0")) > m_forceHardwareAcceleration = true; > } > >diff --git a/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp b/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp >index 1d9bafeb59aeb991693c48353196dc0f8bb88672..eedd4425b7fef68be8769c990d1575fd5fcee667 100644 >--- a/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp >+++ b/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp >@@ -23,10 +23,9 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#include "config.h" > #include "WebProcessMainUnix.h" > >-#include <wtf/Environment.h> >+#include <cstdlib> > > #if USE(GCRYPT) > #include <pal/crypto/gcrypt/Initialization.h> >@@ -43,8 +42,8 @@ int main(int argc, char** argv) > // GnuTLS or simply stops parsing this variable. We intentionally do not > // overwrite this priority string if it's already set by the user. > // https://bugzilla.gnome.org/show_bug.cgi?id=738633 >- // WARNING: This needs to be KEPT IN SYNC with NetworkProcessMain.cpp. >- Environment::setIfNotDefined("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128"); >+ // WARNING: This needs to be KEPT IN SYNC with WebProcessMain.cpp. >+ setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0); > > #if USE(GCRYPT) > PAL::GCrypt::initialize(); >diff --git a/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp b/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp >index 10dccbbca59f12024647cfb77f1e2b6446249de9..b5f7ac489d28dd08f5bb210f413876d31d07cc57 100644 >--- a/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp >+++ b/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp >@@ -33,7 +33,6 @@ > #include <gtk/gtk.h> > #include <libintl.h> > #include <libsoup/soup.h> >-#include <wtf/Environment.h> > > #if PLATFORM(X11) > #include <X11/Xlib.h> >@@ -47,7 +46,7 @@ public: > bool platformInitialize() override > { > #ifndef NDEBUG >- if (Environment::get("WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH")) >+ if (g_getenv("WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH")) > g_usleep(30 * G_USEC_PER_SEC); > #endif > >diff --git a/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp b/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp >index ef4dfdbcffdb193959aff9dd19939f3253faf640..13192b44d436e22e974d3b6733da54ec7c31e4d3 100644 >--- a/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp >+++ b/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp >@@ -34,7 +34,6 @@ > #include <iostream> > #include <libsoup/soup.h> > #include <wpe/wpe.h> >-#include <wtf/Environment.h> > > namespace WebKit { > using namespace WebCore; >@@ -44,7 +43,7 @@ public: > bool platformInitialize() override > { > #if ENABLE(DEVELOPER_MODE) >- if (Environment::get("WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH")) >+ if (g_getenv("WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH")) > WTF::sleep(30_s); > #endif > >diff --git a/Source/WebKitLegacy/ios/Misc/WebUIKitSupport.mm b/Source/WebKitLegacy/ios/Misc/WebUIKitSupport.mm >index 61fbab978609a63e2cdf0efa0d50348945dddc74..ad6fe54a1b20e7d6e50fa75b876c0cf7dbaddd81 100644 >--- a/Source/WebKitLegacy/ios/Misc/WebUIKitSupport.mm >+++ b/Source/WebKitLegacy/ios/Misc/WebUIKitSupport.mm >@@ -38,7 +38,6 @@ > #import <WebCore/Settings.h> > #import <WebCore/WebBackgroundTaskController.h> > #import <WebCore/WebCoreThreadSystemInterface.h> >-#import <wtf/Environment.h> > #import <wtf/spi/darwin/dyldSPI.h> > > using namespace WebCore; >@@ -107,7 +106,7 @@ const char *WebKitPlatformSystemRootDirectory(void) > #if PLATFORM(IOS_FAMILY_SIMULATOR) > static const char *platformSystemRootDirectory = nil; > if (!platformSystemRootDirectory) { >- const char* simulatorRoot = Environment::getRaw("IPHONE_SIMULATOR_ROOT"); >+ char *simulatorRoot = getenv("IPHONE_SIMULATOR_ROOT"); > platformSystemRootDirectory = simulatorRoot ? simulatorRoot : "/"; > } > return platformSystemRootDirectory; >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 3e8d6b5831428cd00be588c6826f041b7e571ab8..480f88502cb5bd55d7ea6d6702a6c6976520c018 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -232,7 +232,6 @@ > #import <pal/spi/mac/NSSpellCheckerSPI.h> > #import <pal/spi/mac/NSWindowSPI.h> > #import <wtf/Assertions.h> >-#import <wtf/Environment.h> > #import <wtf/FileSystem.h> > #import <wtf/HashTraits.h> > #import <wtf/MainThread.h> >@@ -1607,7 +1606,7 @@ static void WebKitInitializeGamepadProviderIfNecessary() > // need for Safari to unset it to prevent it from being passed to applications it launches. > // Unsetting it when a WebView is first created is as good a place as any. > // See <http://bugs.webkit.org/show_bug.cgi?id=4286> for more details. >- if (Environment::get("WEBKIT_UNSET_DYLD_FRAMEWORK_PATH")) { >+ if (getenv("WEBKIT_UNSET_DYLD_FRAMEWORK_PATH")) { > unsetenv("DYLD_FRAMEWORK_PATH"); > unsetenv("WEBKIT_UNSET_DYLD_FRAMEWORK_PATH"); > } >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index ffe05ffb2b7e206f351df28bfee1dd8fecc0801a..4d8dc5b851e40ef2f0ae7c15c6636e05ca087e35 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-15 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r241559 and r241566. >+ https://bugs.webkit.org/show_bug.cgi?id=194710 >+ >+ Causes layout test crashes under GuardMalloc (Requested by >+ ryanhaddad on #webkit). >+ >+ Reverted changesets: >+ >+ "[WTF] Add environment variable helpers" >+ https://bugs.webkit.org/show_bug.cgi?id=192405 >+ https://trac.webkit.org/changeset/241559 >+ >+ "Unreviewed build fix for WinCairo Debug after r241559." >+ https://trac.webkit.org/changeset/241566 >+ > 2019-02-15 Zalan Bujtas <zalan@apple.com> > > [LFC] Out-of-flow box is never a float box >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index d79ecb3f16b65601aebc24c8ac4a46a4a5e35d4e..b052412b0fc3d1b9a9df1340f2f56cf8394bcf6a 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -91,7 +91,6 @@ > #import <WebKit/WebViewPrivate.h> > #import <getopt.h> > #import <wtf/Assertions.h> >-#import <wtf/Environment.h> > #import <wtf/FastMalloc.h> > #import <wtf/LoggingAccumulator.h> > #import <wtf/ObjCRuntimeExtras.h> >@@ -844,10 +843,11 @@ static void destroyWebViewAndOffscreenWindow(WebView *webView) > > static NSString *libraryPathForDumpRenderTree() > { >- if (const char* dumpRenderTreeTemp = Environment::getRaw("DUMPRENDERTREE_TEMP")) >+ char* dumpRenderTreeTemp = getenv("DUMPRENDERTREE_TEMP"); >+ if (dumpRenderTreeTemp) > return [[NSFileManager defaultManager] stringWithFileSystemRepresentation:dumpRenderTreeTemp length:strlen(dumpRenderTreeTemp)]; >- >- return [@"~/Library/Application Support/DumpRenderTree" stringByExpandingTildeInPath]; >+ else >+ return [@"~/Library/Application Support/DumpRenderTree" stringByExpandingTildeInPath]; > } > > static void enableExperimentalFeatures(WebPreferences* preferences) >diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.cpp b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >index 107ad0c88878da40ffc875ae436731378fd743c2..3764fcdd0c50c31648485c99b0d43384ab6620df 100644 >--- a/Tools/DumpRenderTree/win/DumpRenderTree.cpp >+++ b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >@@ -59,7 +59,6 @@ > #include <shlwapi.h> > #include <tchar.h> > #include <windows.h> >-#include <wtf/Environment.h> > #include <wtf/FileSystem.h> > #include <wtf/HashSet.h> > #include <wtf/NeverDestroyed.h> >@@ -215,14 +214,16 @@ static string toUTF8(const wchar_t* wideString, size_t length) > #if USE(CF) > static String libraryPathForDumpRenderTree() > { >- auto path = Environment::get(dumpRenderTreeTemp); >- if (!path || path->isEmpty()) >- return FileSystem::localUserSpecificStorageDirectory(); >- >- if (!path->endsWith('\\')) >- path->append('\\'); >+ DWORD size = ::GetEnvironmentVariable(dumpRenderTreeTemp, 0, 0); >+ Vector<TCHAR> buffer(size); >+ if (::GetEnvironmentVariable(dumpRenderTreeTemp, buffer.data(), buffer.size())) { >+ wstring path = buffer.data(); >+ if (!path.empty() && (path[path.length() - 1] != L'\\')) >+ path.append(L"\\"); >+ return String (path.data(), path.length()); >+ } > >- return *path; >+ return FileSystem::localUserSpecificStorageDirectory(); > } > #endif > >diff --git a/Tools/TestRunnerShared/IOSLayoutTestCommunication.cpp b/Tools/TestRunnerShared/IOSLayoutTestCommunication.cpp >index e2e6517220e1466df971934cc66929a1c37468f2..bc312bf82cd3b6efaa7130015aae8091882f7153 100644 >--- a/Tools/TestRunnerShared/IOSLayoutTestCommunication.cpp >+++ b/Tools/TestRunnerShared/IOSLayoutTestCommunication.cpp >@@ -32,7 +32,6 @@ > #include <sys/types.h> > #include <unistd.h> > #include <wtf/Assertions.h> >-#include <wtf/Environment.h> > > static int stdinSocket; > static int stdoutSocket; >@@ -49,10 +48,11 @@ static int connectToServer(sockaddr_in& serverAddress) > > void setUpIOSLayoutTestCommunication() > { >- auto port = Environment::getInt("PORT"); >- if (!port) >+ char* portFromEnvironment = getenv("PORT"); >+ if (!portFromEnvironment) > return; >- RELEASE_ASSERT(*port > 0); >+ int port = atoi(portFromEnvironment); >+ RELEASE_ASSERT(port > 0); > isUsingTCP = true; > > struct hostent* host = gethostbyname("127.0.0.1"); >@@ -63,7 +63,7 @@ void setUpIOSLayoutTestCommunication() > (char*)&serverAddress.sin_addr.s_addr, > (char*)host->h_addr, > host->h_length); >- serverAddress.sin_port = htons(*port); >+ serverAddress.sin_port = htons(port); > > // This order matches the server side listener in Tools/Scripts/webkitpy/port/simulator_process.py SimulatorProcess._start() > stdinSocket = connectToServer(serverAddress); >diff --git a/Tools/TestWebKitAPI/Tests/WebKit/EnvironmentUtilitiesTest.cpp b/Tools/TestWebKitAPI/Tests/WebKit/EnvironmentUtilitiesTest.cpp >index 204d860e120a43ddfe2f05118c92709e42be9ae0..e1de83265fbf71dc683e7f3c51b553cb377ca8a4 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKit/EnvironmentUtilitiesTest.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebKit/EnvironmentUtilitiesTest.cpp >@@ -28,7 +28,6 @@ > > #include <WebKit/EnvironmentUtilities.h> > #include <stdlib.h> >-#include <wtf/Environment.h> > > namespace TestWebKitAPI { > >@@ -40,7 +39,7 @@ static const char* strip(const char* input) > { > setenv(environmentVariable, input, 1); > WebKit::EnvironmentUtilities::stripValuesEndingWithString(environmentVariable, stripValue); >- return Environment::getRaw(environmentVariable); >+ return getenv(environmentVariable); > } > > TEST(WebKit, StripValuesEndingWithString) >diff --git a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp >index 13f20e24922acbe593812363de1af23246a5e367..998ab2f2a29c26f7fa65d2b81e9e1ef27b4e5d3b 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp >@@ -21,7 +21,6 @@ > > #include "TestMain.h" > #include <gio/gio.h> >-#include <wtf/Environment.h> > #include <wtf/UUID.h> > #include <wtf/text/StringBuilder.h> > >@@ -344,7 +343,7 @@ static void testAutomationSessionApplicationInfo(Test* test, gconstpointer) > > void beforeAll() > { >- Environment::set("WEBKIT_INSPECTOR_SERVER", "127.0.0.1:2229"); >+ g_setenv("WEBKIT_INSPECTOR_SERVER", "127.0.0.1:2229", TRUE); > > AutomationTest::add("WebKitAutomationSession", "request-session", testAutomationSessionRequestSession); > Test::add("WebKitAutomationSession", "application-info", testAutomationSessionApplicationInfo); >diff --git a/Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.cpp b/Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.cpp >index dd60b51854e20208dc34a7b539005388766130c0..a155a5100a6bbaedf0ae1b52769a738718a0f5cf 100644 >--- a/Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.cpp >+++ b/Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.cpp >@@ -21,7 +21,6 @@ > #include "TestMain.h" > > #include <glib/gstdio.h> >-#include <wtf/Environment.h> > > #if PLATFORM(GTK) > #include <gtk/gtk.h> >@@ -67,19 +66,19 @@ static void removeNonEmptyDirectory(const char* directoryPath) > > int main(int argc, char** argv) > { >- Environment::remove("DBUS_SESSION_BUS_ADDRESS"); >+ g_unsetenv("DBUS_SESSION_BUS_ADDRESS"); > #if PLATFORM(GTK) > gtk_test_init(&argc, &argv, nullptr); > #else > g_test_init(&argc, &argv, nullptr); > #endif >- Environment::setIfNotDefined("WEBKIT_EXEC_PATH", WEBKIT_EXEC_PATH); >- Environment::setIfNotDefined("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH); >- Environment::set("LC_ALL", "C"); >- Environment::set("GIO_USE_VFS", "local"); >- Environment::set("GSETTINGS_BACKEND", "memory"); >+ g_setenv("WEBKIT_EXEC_PATH", WEBKIT_EXEC_PATH, FALSE); >+ g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE); >+ g_setenv("LC_ALL", "C", TRUE); >+ g_setenv("GIO_USE_VFS", "local", TRUE); >+ g_setenv("GSETTINGS_BACKEND", "memory", TRUE); > // Get rid of runtime warnings about deprecated properties and signals, since they break the tests. >- Environment::set("G_ENABLE_DIAGNOSTIC", "0"); >+ g_setenv("G_ENABLE_DIAGNOSTIC", "0", TRUE); > g_test_bug_base("https://bugs.webkit.org/"); > > registerGResource(); >diff --git a/Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestBus.cpp b/Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestBus.cpp >index 5a3d5c4091378f8ea4ca7b22873bcb3233402a55..ba6476c8da15bb4b3b846640aa397a567d64525b 100644 >--- a/Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestBus.cpp >+++ b/Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestBus.cpp >@@ -20,8 +20,6 @@ > #include "config.h" > #include "WebKitTestBus.h" > >-#include <wtf/Environment.h> >- > WebKitTestBus::WebKitTestBus() > : m_bus(adoptGRef(g_test_dbus_new(G_TEST_DBUS_NONE))) > { >@@ -34,14 +32,14 @@ WebKitTestBus::~WebKitTestBus() > > bool WebKitTestBus::run() > { >- auto display = Environment::get("DISPLAY"); >- auto runtimeDir = Environment::get("XDG_RUNTIME_DIR"); >+ CString display = g_getenv("DISPLAY"); >+ CString runtimeDir = g_getenv("XDG_RUNTIME_DIR"); > g_test_dbus_up(m_bus.get()); > m_address = g_test_dbus_get_bus_address(m_bus.get()); >- if (display) >- Environment::setIfNotDefined("DISPLAY", *display); >- if (runtimeDir) >- Environment::setIfNotDefined("XDG_RUNTIME_DIR", *runtimeDir); >+ if (!display.isNull()) >+ g_setenv("DISPLAY", display.data(), FALSE); >+ if (!runtimeDir.isNull()) >+ g_setenv("XDG_RUNTIME_DIR", runtimeDir.data(), FALSE); > return !m_address.isNull(); > } > >diff --git a/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp >index 5e8c69a8fdd4d84badb678dc20a32ecc72085b5a..3f8e2440f283e4b4e5427ad644d2b3b4e31965a1 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp >@@ -34,7 +34,6 @@ > #include "InjectedBundleUtilities.h" > #include <fontconfig/fontconfig.h> > #include <gtk/gtk.h> >-#include <wtf/Environment.h> > #include <wtf/glib/GLibUtilities.h> > #include <wtf/glib/GUniquePtr.h> > >@@ -55,8 +54,9 @@ void initializeGtkSettings() > > CString getOutputDir() > { >- if (auto webkitOutputDir = Environment::get("WEBKIT_OUTPUTDIR")) >- return webkitOutputDir->utf8(); >+ const char* webkitOutputDir = g_getenv("WEBKIT_OUTPUTDIR"); >+ if (webkitOutputDir) >+ return webkitOutputDir; > > CString topLevelPath = WTR::topLevelPath(); > GUniquePtr<char> outputDir(g_build_filename(topLevelPath.data(), "WebKitBuild", nullptr)); >@@ -80,7 +80,7 @@ static CString getFontsPath() > > void initializeFontConfigSetting() > { >- if (Environment::get("WEBKIT_SKIP_WEBKITTESTRUNNER_FONTCONFIG_INITIALIZATION")) >+ if (g_getenv("WEBKIT_SKIP_WEBKITTESTRUNNER_FONTCONFIG_INITIALIZATION")) > return; > > FcInit(); >diff --git a/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp >index 249812f85677077572eb4a47b7c6b17ea08845bd..ba08431c4cd7ba7ce052851407f5bf53d50e4e62 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp >@@ -45,7 +45,8 @@ void InjectedBundle::platformInitialize(WKTypeRef) > // messages sent to the logger. > g_log_set_default_handler(logHandler, 0); > >- g_setenv("WEBKIT_TOP_LEVEL", TOP_LEVEL_DIR, FALSE); >+ if (!g_getenv("WEBKIT_TOP_LEVEL")) >+ g_setenv("WEBKIT_TOP_LEVEL", TOP_LEVEL_DIR, FALSE); > } > > } // namespace WTR >diff --git a/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp b/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp >index 92777667561a1e33d36e4a4861ba35bace5a6f73..afbd3f74a1d60d7318d4b798d094320d9ca692ef 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp >@@ -30,7 +30,6 @@ > #include "InjectedBundleUtilities.h" > > #include <gtk/gtk.h> >-#include <wtf/Environment.h> > #include <wtf/glib/GLibUtilities.h> > #include <wtf/glib/GUniquePtr.h> > >@@ -38,8 +37,8 @@ namespace WTR { > > CString topLevelPath() > { >- if (auto topLevelDirectory = Environment::get("WEBKIT_TOP_LEVEL")) >- return topLevelDirectory->utf8(); >+ if (const char* topLevelDirectory = g_getenv("WEBKIT_TOP_LEVEL")) >+ return topLevelDirectory; > > // If the environment variable wasn't provided then assume we were built into > // WebKitBuild/Debug or WebKitBuild/Release. Obviously this will fail if the build >diff --git a/Tools/WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp b/Tools/WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp >index 9d1ed8097541df64c5c14b6fbe39d52daadbae6c..a49c7a292182591e2727b2b901e412b2de8e03da 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp >@@ -27,7 +27,6 @@ > #include "ActivateFonts.h" > > #include <fontconfig/fontconfig.h> >-#include <wtf/Environment.h> > #include <wtf/glib/GLibUtilities.h> > #include <wtf/glib/GUniquePtr.h> > >@@ -35,8 +34,8 @@ namespace WTR { > > CString topLevelPath() > { >- if (auto topLevelDirectory = Environment::get("WEBKIT_TOP_LEVEL")) >- return topLevelDirectory->utf8(); >+ if (const char* topLevelDirectory = g_getenv("WEBKIT_TOP_LEVEL")) >+ return topLevelDirectory; > > // If the environment variable wasn't provided then assume we were built into > // WebKitBuild/Debug or WebKitBuild/Release. Obviously this will fail if the build >@@ -49,8 +48,9 @@ CString topLevelPath() > > CString getOutputDir() > { >- if (auto webkitOutputDir = Environment::get("WEBKIT_OUTPUTDIR")) >- return webkitOutputDir->utf8(); >+ const char* webkitOutputDir = g_getenv("WEBKIT_OUTPUTDIR"); >+ if (webkitOutputDir) >+ return webkitOutputDir; > > GUniquePtr<char> outputDir(g_build_filename(topLevelPath().data(), "WebKitBuild", nullptr)); > return outputDir.get(); >@@ -73,7 +73,7 @@ static CString getFontsPath() > > void activateFonts() > { >- if (Environment::get("WEBKIT_SKIP_WEBKITTESTRUNNER_FONTCONFIG_INITIALIZATION")) >+ if (g_getenv("WEBKIT_SKIP_WEBKITTESTRUNNER_FONTCONFIG_INITIALIZATION")) > return; > > FcInit(); >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index aa89f2a31d2c2d94eb691d05a839b2b465db07c4..10aebcfd4bb9226c9818fee26ee6c00d17ac1794 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -72,7 +72,6 @@ > #include <string> > #include <wtf/AutodrainedPool.h> > #include <wtf/CryptographicallyRandomNumber.h> >-#include <wtf/Environment.h> > #include <wtf/MainThread.h> > #include <wtf/ProcessPrivilege.h> > #include <wtf/RefCounted.h> >@@ -387,15 +386,15 @@ WKPageRef TestController::createOtherPage(PlatformWebView* parentView, WKPageCon > return newPage; > } > >-String TestController::libraryPathForTesting() >+const char* TestController::libraryPathForTesting() > { > // FIXME: This may not be sufficient to prevent interactions/crashes > // when running more than one copy of DumpRenderTree. > // See https://bugs.webkit.org/show_bug.cgi?id=10906 >- if (auto dumpRenderTreeTemp = Environment::get("DUMPRENDERTREE_TEMP")) >- return *dumpRenderTreeTemp; >- >- return String::fromUTF8(platformLibraryPathForTesting()); >+ char* dumpRenderTreeTemp = getenv("DUMPRENDERTREE_TEMP"); >+ if (dumpRenderTreeTemp) >+ return dumpRenderTreeTemp; >+ return platformLibraryPathForTesting(); > } > > void TestController::initialize(int argc, const char* argv[]) >@@ -462,8 +461,9 @@ WKRetainPtr<WKContextConfigurationRef> TestController::generateContextConfigurat > WKContextConfigurationSetFullySynchronousModeIsAllowedForTesting(configuration.get(), true); > WKContextConfigurationSetIgnoreSynchronousMessagingTimeoutsForTesting(configuration.get(), options.ignoreSynchronousMessagingTimeouts); > >- auto temporaryFolder = libraryPathForTesting(); >- if (!!temporaryFolder) { >+ if (const char* dumpRenderTreeTemp = libraryPathForTesting()) { >+ String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp); >+ > WKContextConfigurationSetApplicationCacheDirectory(configuration.get(), toWK(temporaryFolder + pathSeparator + "ApplicationCache").get()); > WKContextConfigurationSetDiskCacheDirectory(configuration.get(), toWK(temporaryFolder + pathSeparator + "Cache").get()); > WKContextConfigurationSetIndexedDBDatabaseDirectory(configuration.get(), toWK(temporaryFolder + pathSeparator + "Databases" + pathSeparator + "IndexedDB").get()); >@@ -481,8 +481,9 @@ WKRetainPtr<WKPageConfigurationRef> TestController::generatePageConfiguration(WK > > m_geolocationProvider = std::make_unique<GeolocationProviderMock>(m_context.get()); > >- auto temporaryFolder = libraryPathForTesting(); >- if (!!temporaryFolder) { >+ if (const char* dumpRenderTreeTemp = libraryPathForTesting()) { >+ String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp); >+ > // FIXME: This should be migrated to WKContextConfigurationRef. > // Disable icon database to avoid fetching <http://127.0.0.1:8000/favicon.ico> and making tests flaky. > // Invividual tests can enable it using testRunner.setIconDatabaseEnabled, although it's not currently supported in WebKitTestRunner. >@@ -1380,7 +1381,7 @@ static std::string contentExtensionJSONPath(WKURLRef url) > #if ENABLE(CONTENT_EXTENSIONS) > void TestController::configureContentExtensionForTest(const TestInvocation& test) > { >- auto contentExtensionsPath = libraryPathForTesting(); >+ const char* contentExtensionsPath = libraryPathForTesting(); > if (!contentExtensionsPath) > contentExtensionsPath = "/tmp/wktr-contentextensions"; > >@@ -1399,7 +1400,7 @@ void TestController::configureContentExtensionForTest(const TestInvocation& test > std::string jsonFileContents {std::istreambuf_iterator<char>(jsonFile), std::istreambuf_iterator<char>()}; > auto jsonSource = adoptWK(WKStringCreateWithUTF8CString(jsonFileContents.c_str())); > >- auto storePath = adoptWK(WKStringCreateWithUTF8CString(contentExtensionsPath.utf8().data())); >+ auto storePath = adoptWK(WKStringCreateWithUTF8CString(contentExtensionsPath)); > auto extensionStore = adoptWK(WKUserContentExtensionStoreCreate(storePath.get())); > ASSERT(extensionStore); > >@@ -1422,13 +1423,13 @@ void TestController::resetContentExtensions() > > WKPageSetUserContentExtensionsEnabled(mainWebView()->page(), false); > >- auto contentExtensionsPath = libraryPathForTesting(); >+ const char* contentExtensionsPath = libraryPathForTesting(); > if (!contentExtensionsPath) > return; > > WKUserContentControllerRemoveAllUserContentFilters(userContentController()); > >- auto storePath = adoptWK(WKStringCreateWithUTF8CString(contentExtensionsPath.utf8().data())); >+ auto storePath = adoptWK(WKStringCreateWithUTF8CString(contentExtensionsPath)); > auto extensionStore = adoptWK(WKUserContentExtensionStoreCreate(storePath.get())); > ASSERT(extensionStore); > >@@ -2278,11 +2279,12 @@ WKStringRef TestController::decideDestinationWithSuggestedFilename(WKContextRef, > m_currentInvocation->outputText(builder.toString()); > } > >- auto temporaryFolder = libraryPathForTesting(); >- if (!temporaryFolder) >+ const char* dumpRenderTreeTemp = libraryPathForTesting(); >+ if (!dumpRenderTreeTemp) > return nullptr; > > *allowOverwrite = true; >+ String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp); > if (suggestedFilename.isEmpty()) > suggestedFilename = "Unknown"; > >@@ -2826,9 +2828,11 @@ WKContextRef TestController::platformAdjustContext(WKContextRef context, WKConte > auto* dataStore = WKContextGetWebsiteDataStore(context); > WKWebsiteDataStoreSetResourceLoadStatisticsEnabled(dataStore, true); > >- auto temporaryFolder = libraryPathForTesting(); >- if (!!temporaryFolder) >+ if (const char* dumpRenderTreeTemp = libraryPathForTesting()) { >+ String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp); >+ > WKWebsiteDataStoreSetServiceWorkerRegistrationDirectory(dataStore, toWK(temporaryFolder + pathSeparator + "ServiceWorkers").get()); >+ } > > return context; > } >diff --git a/Tools/WebKitTestRunner/TestController.h b/Tools/WebKitTestRunner/TestController.h >index 74cb06957812d495ed6ead0f76421d1922bcb621..b43c55c28665dfe65f42215aebc40271b3254c64 100644 >--- a/Tools/WebKitTestRunner/TestController.h >+++ b/Tools/WebKitTestRunner/TestController.h >@@ -37,7 +37,6 @@ > #include <wtf/Seconds.h> > #include <wtf/Vector.h> > #include <wtf/text/StringHash.h> >-#include <wtf/text/WTFString.h> > > #if PLATFORM(COCOA) > #include "ClassMethodSwizzler.h" >@@ -445,7 +444,7 @@ private: > static void runModal(WKPageRef, const void* clientInfo); > static void runModal(PlatformWebView*); > >- static String libraryPathForTesting(); >+ static const char* libraryPathForTesting(); > static const char* platformLibraryPathForTesting(); > > std::unique_ptr<TestInvocation> m_currentInvocation; >diff --git a/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm b/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >index 2765f6a6a928216bfb74868ac357929ac5463c55..fe3bd6e0e5484cf83233b727fb2c1d56293beadf 100644 >--- a/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >+++ b/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >@@ -108,11 +108,11 @@ void initializeWebViewConfiguration(const char* libraryPath, WKStringRef injecte > > void TestController::cocoaPlatformInitialize() > { >- auto dumpRenderTreeTemp = libraryPathForTesting(); >+ const char* dumpRenderTreeTemp = libraryPathForTesting(); > if (!dumpRenderTreeTemp) > return; > >- auto resourceLoadStatisticsFolder = makeString(dumpRenderTreeTemp, "/ResourceLoadStatistics"); >+ String resourceLoadStatisticsFolder = String(dumpRenderTreeTemp) + '/' + "ResourceLoadStatistics"; > [[NSFileManager defaultManager] createDirectoryAtPath:resourceLoadStatisticsFolder withIntermediateDirectories:YES attributes:nil error: nil]; > String fullBrowsingSessionResourceLog = resourceLoadStatisticsFolder + '/' + "full_browsing_session_resourceLog.plist"; > NSDictionary *resourceLogPlist = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithInt:1], @"version", nil]; >@@ -207,7 +207,7 @@ PlatformWebView* TestController::platformCreateOtherPage(PlatformWebView* parent > WKContextRef TestController::platformAdjustContext(WKContextRef context, WKContextConfigurationRef contextConfiguration) > { > #if WK_API_ENABLED >- initializeWebViewConfiguration(libraryPathForTesting().utf8().data(), injectedBundlePath(), context, contextConfiguration); >+ initializeWebViewConfiguration(libraryPathForTesting(), injectedBundlePath(), context, contextConfiguration); > return (__bridge WKContextRef)globalWebViewConfiguration.processPool; > #else > return nullptr; >diff --git a/Tools/WebKitTestRunner/gtk/main.cpp b/Tools/WebKitTestRunner/gtk/main.cpp >index a4d18b3026339eddd40307980af9053270e9dd10..a203956fc21048a5129f5c675e5913ee18f28344 100644 >--- a/Tools/WebKitTestRunner/gtk/main.cpp >+++ b/Tools/WebKitTestRunner/gtk/main.cpp >@@ -28,12 +28,11 @@ > #include "TestController.h" > #include <WebKit/WKTextCheckerGtk.h> > #include <gtk/gtk.h> >-#include <wtf/Environment.h> > #include <wtf/glib/GRefPtr.h> > > int main(int argc, char** argv) > { >- Environment::setIfNotDefined("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR", "1"); >+ g_setenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR", "1", FALSE); > > gtk_init(&argc, &argv); > >diff --git a/Tools/WebKitTestRunner/mac/TestControllerMac.mm b/Tools/WebKitTestRunner/mac/TestControllerMac.mm >index 6db4b25dcdfeb051dec61e3a0d9f3d38f5bad8fc..3e773bc0d5b523a35a406408c81cdb157950afe2 100644 >--- a/Tools/WebKitTestRunner/mac/TestControllerMac.mm >+++ b/Tools/WebKitTestRunner/mac/TestControllerMac.mm >@@ -135,10 +135,10 @@ void TestController::configureContentExtensionForTest(const TestInvocation& test > __block bool doneCompiling = false; > > NSURL *tempDir; >- auto temporaryFolder = libraryPathForTesting(); >- if (!!temporaryFolder) >+ if (const char* dumpRenderTreeTemp = libraryPathForTesting()) { >+ String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp); > tempDir = [NSURL fileURLWithPath:[(NSString*)temporaryFolder stringByAppendingPathComponent:@"ContentExtensions"] isDirectory:YES]; >- else >+ } else > tempDir = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"ContentExtensions"] isDirectory:YES]; > > [[_WKUserContentExtensionStore storeWithURL:tempDir] compileContentExtensionForIdentifier:@"TestContentExtensions" encodedContentExtension:contentExtensionString completionHandler:^(_WKUserContentFilter *filter, NSError *error) >diff --git a/Tools/WebKitTestRunner/wpe/main.cpp b/Tools/WebKitTestRunner/wpe/main.cpp >index 135bd25cf274fdcc90187223a642cd129c9c2edd..d62269dd3998eae0bb5ddc0b234f1b0096480bd7 100644 >--- a/Tools/WebKitTestRunner/wpe/main.cpp >+++ b/Tools/WebKitTestRunner/wpe/main.cpp >@@ -27,11 +27,10 @@ > > #include "TestController.h" > #include <glib.h> >-#include <wtf/Environment.h> > > int main(int argc, char** argv) > { >- Environment::setIfNotDefined("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR", "1"); >+ g_setenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR", "1", FALSE); > > WTR::TestController controller(argc, const_cast<const char**>(argv)); > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194710
: 362124