[PATCH] kjs/lookup.h

Adriaan de Groot groot at kde.org
Sat Dec 27 09:08:22 GMT 2008

On Saturday 27 December 2008 09:50:33 Adriaan de Groot wrote:
> This patch works around the workaround for gcc bugs in kjs/lookup.h; those
> of us without gcc don't hit that problem, but the non-gcc set of defines
> seems to be inconsistent in where the JS object cache lives. With a small
> massage we can put the cache into namespace KJS when that is supported.

That patch doesn't stand on its own, since the clients of the JS object cache 
need to be modified not to use the GCC_ROOT_NS_HACK as well:

Index: khtml/ecma/kjs_binding.h
--- khtml/ecma/kjs_binding.h    (revision 901981)
+++ khtml/ecma/kjs_binding.h    (working copy)
@@ -413,10 +413,10 @@
 // cacheGlobalObject<> is not in namespace KJS - need to use 
 #define KJS_EMPTY_PROTOTYPE_IMP(ClassName, ClassProto, ProtoCode) \
       class ClassProto : public JSObject { \
-      friend JSObject* KJS_GCC_ROOT_NS_HACK 
cacheGlobalObject<ClassProto>(ExecState *exec, const Identifier 
&propertyName); \
cacheGlobalObject<ClassProto>(ExecState *exec, const Identifier 
&propertyName); \
       public: \
         static JSObject* self(ExecState *exec) { \
-          return ::cacheGlobalObject<ClassProto>(exec, *name()); \
+          return KJS_CACHEGLOBALOBJECT_NS cacheGlobalObject<ClassProto>(exec, 
*name()); \
         } \
         virtual const ClassInfo *classInfo() const { return &info; } \
         static const ClassInfo info; \

More information about the kde-core-devel mailing list