diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-31 08:34:14 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-31 08:39:34 (GMT) |
commit | bc8574e03e8aa493393e84675c6d177fc00f12fb (patch) | |
tree | eb37234110f79ffcccfa9059a92118f6aa1e3266 /src/script | |
parent | e42379ebf53a41807791ee243bcebb83c3e2faed (diff) | |
download | Qt-bc8574e03e8aa493393e84675c6d177fc00f12fb.zip Qt-bc8574e03e8aa493393e84675c6d177fc00f12fb.tar.gz Qt-bc8574e03e8aa493393e84675c6d177fc00f12fb.tar.bz2 |
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.
Diffstat (limited to 'src/script')
-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 3ae7146..c427202 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; |