Change-Id: I641127b0d46f88291468af767cbbeb28ce5a75d9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
ExecutionEngine::~ExecutionEngine()
{
delete globalObject.asObject();
+ rootContext->destroy();
delete rootContext;
qDeleteAll(functions);
delete memoryManager;
eng->exception = Value::undefinedValue();
}
+void ExecutionContext::destroy()
+{
+ delete[] arguments;
+ delete[] locals;
+}
+
bool ExecutionContext::deleteProperty(String *name)
{
for (ExecutionContext *ctx = this; ctx; ctx = ctx->outer()) {
With *next;
} *withObject;
-
void init(ExecutionEngine *e);
+ void destroy();
bool hasBinding(String *name) const;
void createMutableBinding(String *name, bool deletable);
{
#ifndef Q_WS_WIN
long int tt = (long int)(t / msPerSecond);
- struct tm *tmtm = localtime((const time_t*)&tt);
- if (! tmtm)
+ struct tm tmtm;
+ if (!localtime_r((const time_t*)&tt, &tmtm))
return 0;
- return (tmtm->tm_isdst > 0) ? msPerHour : 0;
+ return (tmtm.tm_isdst > 0) ? msPerHour : 0;
#else
Q_UNUSED(t);
/// ### implement me