StuartX wrote:
  // register the cookie manager
  nsCOMPtr<nsICookieService> cookieService =
           do_GetService(kCookieServiceCID, &rv);
  if (NS_FAILED(rv) || (nsnull == cookieService)) {
#ifdef DEBUG
    printf("Unable to instantiate Cookie Manager\n");
#endif
  }

Just as a casual observer, perhaps setting the #ifdef outside that block would be useful if the ONLY action of the block is a debug printf ;-)

That would save some cycles on checking those conditions. Also as a personal nit, which do you expect the MOST, a NS_FAILED or a nsnull == put the most expected first.

~Justin Wood (Callek)

[Of course I am unsure if this is mozilla.org incorporated code, or third-party, but either way it will be helpful to do it ;-).]
_______________________________________________
mozilla-layout mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-layout

Reply via email to