summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-31 08:34:14 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-31 08:39:34 (GMT)
commitbc8574e03e8aa493393e84675c6d177fc00f12fb (patch)
treeeb37234110f79ffcccfa9059a92118f6aa1e3266 /src
parente42379ebf53a41807791ee243bcebb83c3e2faed (diff)
downloadQt-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')
-rw-r--r--src/script/bridge/qscriptobject_p.h2
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;