From bc8574e03e8aa493393e84675c6d177fc00f12fb Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 31 Aug 2009 10:34:14 +0200 Subject: 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. --- src/script/bridge/qscriptobject_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 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; -- cgit v0.12