aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit/qv4isel_masm.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-22 12:35:08 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-22 12:40:18 +0000
commit8848abe69fa957d5406659229cecdada83da8421 (patch)
treebec001ed4f959735e5371c1e5b4a55b4784e59c8 /src/qml/jit/qv4isel_masm.cpp
parentbef2dc8a236d4062f6b05b10cf99e6d081e4d6ce (diff)
QML: Sanitize reading environment variables.
Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Change-Id: Ia8b7534e6f5165bd8a6b4e63ccc139c42dd03056 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/jit/qv4isel_masm.cpp')
-rw-r--r--src/qml/jit/qv4isel_masm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 782b0c8659..9696f59e7c 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -185,7 +185,7 @@ JSC::MacroAssemblerCodeRef Assembler::link(int *codeSize)
JSC::MacroAssemblerCodeRef codeRef;
- static bool showCode = !qgetenv("QV4_SHOW_ASM").isNull();
+ static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_ASM");
if (showCode) {
QBuffer buf;
buf.open(QIODevice::WriteOnly);
@@ -275,7 +275,7 @@ void InstructionSelection::run(int functionIndex)
IR::Optimizer opt(_function);
opt.run(qmlEngine);
- static const bool withRegisterAllocator = qgetenv("QV4_NO_REGALLOC").isEmpty();
+ static const bool withRegisterAllocator = qEnvironmentVariableIsEmpty("QV4_NO_REGALLOC");
if (Assembler::RegAllocIsSupported && opt.isInSSA() && withRegisterAllocator) {
RegisterAllocator regalloc(Assembler::getRegisterInfo());
regalloc.run(_function, opt);