John Bandhauer <[EMAIL PROTECTED]> wrote
> David Bradley wrote:
> >
> > Per Winkvist wrote:
> > > service->evictEntries (1); /* 1 == STORE_IN_MEMORY */
> >
> > Change to service->EvictEntries (1);
> >
> > In JS, the first character is changed to lower case to keep with JS
> > conventions.
>
> I agree with David's solution. His explanation is a little off
> though. Just for the record... We encourage people to use leading
> lowercase for methods and attribute declarations in idl. The
> xpidl compiler converts these to uppercase for the C++ headers to
> match our C++ case convention. JS and other language mappings
> that use the generated type libraries match whatever case was in
> the original idl declaration. This scheme lets up match both the
> C++ and JS case conventions. It was controversial at the time.
> But that's what we did.
>
> Also, please use nsICache::STORE_IN_MEMORY rather than a magic
> number in your C++ code. I know this was just a sample, but also
> please check 'service' for null before using it.
>
I'd tried to cut down on code in the example :=)
I'm passing the result parameter to do_GetService and using NS_SUCCEEDED(rv)
before using the pointer. That should be sufficient right ?
It works fine, however every now and then I get a nsDebug::Assertion
"ASSERTION: new cache entry for READ-ONLY request: '*accessGranted',
file ...nsCacheEntry, line 233"
Thanks guys,
Per