diff options
author | Oleg Shparber <[email protected]> | 2014-12-31 10:43:46 -0800 |
---|---|---|
committer | Oleg Shparber <[email protected]> | 2015-01-02 21:29:48 +0100 |
commit | 21d481c209692ec73ab6b6bc43e6977fc2f8c2fc (patch) | |
tree | c691a8a9ec3a275a1adfe7f2dca741ca77032648 /src | |
parent | 2fadffdc4630eca35d775d973a368feae2630bd9 (diff) |
Use QV4::ScopedContext typedef instead of actual type
Change-Id: I71c6c9cf030e347fbc5e4073e9ca338a9ce95999
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 10 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4debugging.cpp | 8 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 2857ff8568..f6d27347f6 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -107,7 +107,7 @@ void ExecutionContext::createMutableBinding(String *name, bool deletable) // find the right context to create the binding on ScopedObject activation(scope, d()->engine->globalObject()); - Scoped<ExecutionContext> ctx(scope, this); + ScopedContext ctx(scope, this); while (ctx) { if (ctx->d()->type >= Heap::ExecutionContext::Type_CallContext) { Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx->d()); @@ -208,7 +208,7 @@ bool ExecutionContext::deleteProperty(String *name) { Scope scope(this); bool hasWith = false; - Scoped<ExecutionContext> ctx(scope, this); + ScopedContext ctx(scope, this); for (; ctx; ctx = ctx->d()->outer) { if (ctx->d()->type == Heap::ExecutionContext::Type_WithContext) { hasWith = true; @@ -284,7 +284,7 @@ void ExecutionContext::markObjects(Heap::Base *m, ExecutionEngine *engine) void ExecutionContext::setProperty(String *name, const ValueRef value) { Scope scope(this); - Scoped<ExecutionContext> ctx(scope, this); + ScopedContext ctx(scope, this); for (; ctx; ctx = ctx->d()->outer) { if (ctx->d()->type == Heap::ExecutionContext::Type_WithContext) { ScopedObject w(scope, static_cast<Heap::WithContext *>(ctx->d())->withObject); @@ -349,7 +349,7 @@ ReturnedValue ExecutionContext::getProperty(String *name) bool hasWith = false; bool hasCatchScope = false; - Scoped<ExecutionContext> ctx(scope, this); + ScopedContext ctx(scope, this); for (; ctx; ctx = ctx->d()->outer) { if (ctx->d()->type == Heap::ExecutionContext::Type_WithContext) { ScopedObject w(scope, static_cast<Heap::WithContext *>(ctx->d())->withObject); @@ -416,7 +416,7 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Heap::Object ** bool hasWith = false; bool hasCatchScope = false; - Scoped<ExecutionContext> ctx(scope, this); + ScopedContext ctx(scope, this); for (; ctx; ctx = ctx->d()->outer) { if (ctx->d()->type == Heap::ExecutionContext::Type_WithContext) { ScopedObject w(scope, static_cast<Heap::WithContext *>(ctx->d())->withObject); diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp index 22815b8542..85874d1318 100644 --- a/src/qml/jsruntime/qv4debugging.cpp +++ b/src/qml/jsruntime/qv4debugging.cpp @@ -278,7 +278,7 @@ static inline Heap::CallContext *findContext(Heap::ExecutionContext *ctxt, int f return 0; Scope scope(ctxt->engine); - Scoped<ExecutionContext> ctx(scope, ctxt); + ScopedContext ctx(scope, ctxt); while (ctx) { CallContext *cCtxt = ctx->asCallContext(); if (cCtxt && cCtxt->d()->function) { @@ -298,7 +298,7 @@ static inline Heap::CallContext *findScope(Heap::ExecutionContext *ctxt, int sco return 0; Scope s(ctxt->engine); - Scoped<ExecutionContext> ctx(s, ctxt); + ScopedContext ctx(s, ctxt); for (; scope > 0 && ctx; --scope) ctx = ctx->d()->outer; @@ -427,7 +427,7 @@ bool Debugger::collectThisInContext(Debugger::Collector *collector, int frame) bool myRun() { Scope scope(engine); - Scoped<ExecutionContext> ctxt(scope, findContext(engine->currentContext(), frameNr)); + ScopedContext ctxt(scope, findContext(engine->currentContext(), frameNr)); while (ctxt) { if (CallContext *cCtxt = ctxt->asCallContext()) if (cCtxt->d()->activation) @@ -500,7 +500,7 @@ QVector<Heap::ExecutionContext::ContextType> Debugger::getScopeTypes(int frame) if (!sctxt || sctxt->d()->type < Heap::ExecutionContext::Type_SimpleCallContext) return types; - Scoped<ExecutionContext> it(scope, sctxt->d()); + ScopedContext it(scope, sctxt->d()); for (; it; it = it->d()->outer) types.append(it->d()->type); diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index e1e57f9c2d..239a799a29 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -748,7 +748,7 @@ QVector<StackFrame> ExecutionEngine::stackTrace(int frameLimit) const ScopedString name(scope); QVector<StackFrame> stack; - Scoped<ExecutionContext> c(scope, currentContext()); + ScopedContext c(scope, currentContext()); while (c && frameLimit) { CallContext *callCtx = c->asCallContext(); if (callCtx && callCtx->d()->function) { @@ -838,7 +838,7 @@ QUrl ExecutionEngine::resolvedUrl(const QString &file) QUrl base; Scope scope(this); - Scoped<ExecutionContext> c(scope, currentContext()); + ScopedContext c(scope, currentContext()); while (c) { CallContext *callCtx = c->asCallContext(); if (callCtx && callCtx->d()->function) { diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 06c4e6f592..68dabfb203 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1691,7 +1691,7 @@ ReturnedValue GlobalExtensions::method_qsTr(CallContext *ctx) int length = lastDot - (lastSlash + 1); context = (lastSlash > -1) ? path.mid(lastSlash + 1, (length > -1) ? length : -1) : QString(); } else if (ctx->d()->parent) { - Scoped<ExecutionContext> parentCtx(scope, ctx->d()->parent); + ScopedContext parentCtx(scope, ctx->d()->parent); // The first non-empty source URL in the call stack determines the translation context. while (parentCtx && context.isEmpty()) { if (QV4::CompiledData::CompilationUnit *unit = parentCtx->d()->compilationUnit) { |