[webkit-dev] Question about ForwardingHeaders

Artem Ananiev Artem.Ananiev at Sun.COM
Mon Jul 27 10:42:06 PDT 2009


Hi,

could anyone explain me, please, what's the purpose of 
JSC/ForwardingHeaders? Here is the sequence of includes which looks 
redundant for me:

WebCore/bindings/js/ScriptValue.cpp includes JavaScriptCore/JSValueRef.h

that's fine, we don't want to reference any headers from JavaScriptCore 
directly

JavaScriptCore/JSValueRef.h is found in JavaScriptCore/ForwardingHeaders

JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h includes 
JavaScriptCore/API/JSValueRef.h

JavaScriptCore/API/JSValueRef.h includes JavaScriptCore/JSBase.h

here is what I can't understand: why couldn't JSBase.h be included 
directly as it's located in the same folder (JavaScriptCore/API)? Instead,

JavaScriptCore/JSBase.h is found in JavaScriptCore/ForwardingHeaders

JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h includes 
JavaScriptCore/API/JSBase.h

----

Here is another problem with ForwardingHeaders, this time in WebCore/ 
folder. For example, WebCore/ForwardingHeaders/wtf/Platform.h file 
includes JavaScriptCore/Platform.h which can't be resolved. This makes 
the whole directory WebCore/ForwardingHeaders completely useless, and I 
still need to have JavaScriptCore and JavaScriptCore/ForwardingHeaders 
in my include path.

Thanks,

Artem


More information about the webkit-dev mailing list