summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptcontextinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/qscriptcontextinfo.cpp')
-rw-r--r--src/script/api/qscriptcontextinfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index d39abe6..0f9de1d 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -157,7 +157,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
JSC::Instruction *returnPC = rewindContext->returnPC();
JSC::CodeBlock *codeBlock = frame->codeBlock();
- if (returnPC && codeBlock) {
+ if (returnPC && codeBlock && QScriptEnginePrivate::hasValidCodeBlockRegister(frame)) {
#if ENABLE(JIT)
unsigned bytecodeOffset = codeBlock->getBytecodeIndex(frame, JSC::ReturnAddressPtr(returnPC));
#else
@@ -171,7 +171,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
// Get the filename and the scriptId:
JSC::CodeBlock *codeBlock = frame->codeBlock();
- if (codeBlock) {
+ if (codeBlock && QScriptEnginePrivate::hasValidCodeBlockRegister(frame)) {
JSC::SourceProvider *source = codeBlock->source();
scriptId = source->asID();
fileName = source->url();