Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Case sensitivity in FF

10 views
Skip to first unread message

jeremy...@gmx.ch

unread,
Apr 4, 2013, 11:25:39 AM4/4/13
to
Hi together,

this is just a minor question concerning case sensitivity. In nsScriptLoader.cpp I found the two function calls

rv = csp->GetAllowsInlineScript(...); and csp->LogViolationDetails(...)

If I got this right, they refer to

logViolationDetails: function(...) and getAllowsInlineScript: function(...)

in contentSecurityPolicy.js

I wonder, why it is allowed here to write the function names differently. The functions in the js file start with lower case, while the cpp functions are uppercase.

Regards
Jeremy

Boris Zbarsky

unread,
Apr 4, 2013, 12:03:55 PM4/4/13
to mozilla-de...@lists.mozilla.org
On 4/4/13 11:25 AM, jeremy...@gmx.ch wrote:
> I wonder, why it is allowed here to write the function names differently.

Not just allowed, but required.

And the reason is that the XPIDL C++ bindings always uppercase the first
letter of the method/property name, while the JS bindings use the same
case as in the IDL.

-Boris

jeremy...@gmx.ch

unread,
Apr 4, 2013, 12:34:39 PM4/4/13
to
Quick and simple answer. Thanks.

Jeremy
0 new messages