Bug 1394369 - Add calling script name + line LOG to HttpChannelChild::AsyncOpen. r=mcmanus

This commit is contained in:
Honza Bambas 2017-08-28 04:09:00 -04:00
parent 479aa79ca8
commit 1d0de9b6b3

View File

@ -2304,6 +2304,18 @@ HttpChannelChild::AsyncOpen(nsIStreamListener *listener, nsISupports *aContext)
LOG(("HttpChannelChild::AsyncOpen [this=%p uri=%s]\n", this, mSpec.get()));
if (LOG4_ENABLED()) {
JSContext* cx = nsContentUtils::GetCurrentJSContext();
if (cx) {
nsAutoCString fileNameString;
uint32_t line = 0, col = 0;
if (nsJSUtils::GetCallingLocation(cx, fileNameString, &line, &col)) {
LOG(("HttpChannelChild %p source script=%s:%u:%u",
this, fileNameString.get(), line, col));
}
}
}
#ifdef DEBUG
AssertPrivateBrowsingId();
#endif