diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-31 10:34:14 +0200 |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-31 10:39:34 +0200 |
commit | bc8574e03e8aa493393e84675c6d177fc00f12fb (patch) | |
tree | eb37234110f79ffcccfa9059a92118f6aa1e3266 | |
parent | e42379ebf53a41807791ee243bcebb83c3e2faed (diff) | |
download | qt4-tools-bc8574e03e8aa493393e84675c6d177fc00f12fb.tar.gz |
make sure hasInstance() is always invoked for custom script objects
Need to specify the OverridesHasInstance flag, otherwise the JIT will
do the standard hasInstance implementation instead of calling our
virtual function.
This makes the QScriptClass::extension() autotest pass.
-rw-r--r-- | src/script/bridge/qscriptobject_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/bridge/qscriptobject_p.h b/src/script/bridge/qscriptobject_p.h index 3ae7146715..c4272025a2 100644 --- a/src/script/bridge/qscriptobject_p.h +++ b/src/script/bridge/qscriptobject_p.h @@ -99,7 +99,7 @@ public: static WTF::PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) { - return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, JSC::ImplementsHasInstance)); + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, JSC::ImplementsHasInstance | JSC::OverridesHasInstance)); } JSC::JSValue data() const; |