Ignore:
Timestamp:
Jul 14, 2010, 7:35:08 AM (15 years ago)
Author:
[email protected]
Message:

2010-07-14 Jedrzej Nowacki <[email protected]>

Reviewed by Kenneth Rohde Christiansen.

Introduce QScriptOriginalGlobalObject.

QtScript exposes more functionality than JSC C API. Sometimes it is
necessary to take a shortcut in implementation. Really often we have
to use a standard JS function. These function could be changed or
even deleted by a script, so a backup of a reference to an object is needed.

In them same time this is rather a workaround then real fix, so the code
should be separated and changed easily in future. It is why we need
the new internal class.

The patch fixes a few crashes.

[Qt] QScriptEngine should work correctly even after global object changes
https://bugs.webkit.org/show_bug.cgi?id=41839

  • api/QtScript.pro:
  • api/qscriptengine_p.cpp: (QScriptEnginePrivate::QScriptEnginePrivate): (QScriptEnginePrivate::~QScriptEnginePrivate):
  • api/qscriptengine_p.h: (QScriptEnginePrivate::isArray): (QScriptEnginePrivate::isError): (QScriptEnginePrivate::objectHasOwnProperty): (QScriptEnginePrivate::objectGetOwnPropertyNames):
  • api/qscriptoriginalglobalobject_p.h: Added. (QScriptOriginalGlobalObject::QScriptOriginalGlobalObject): (QScriptOriginalGlobalObject::initializeMember): (QScriptOriginalGlobalObject::~QScriptOriginalGlobalObject): (QScriptOriginalGlobalObject::objectHasOwnProperty): (QScriptOriginalGlobalObject::objectGetOwnPropertyNames): (QScriptOriginalGlobalObject::isArray): (QScriptOriginalGlobalObject::isError): (QScriptOriginalGlobalObject::isType):
  • api/qscriptvalue_p.h: (QScriptValuePrivate::isError): (QScriptValuePrivate::hasOwnProperty):
  • api/qscriptvalueiterator_p.h: (QScriptValueIteratorPrivate::QScriptValueIteratorPrivate):
  • tests/qscriptvalue/tst_qscriptvalue.cpp: (tst_QScriptValue::globalObjectChanges):
  • tests/qscriptvalue/tst_qscriptvalue.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.