Loading js/xpconnect/src/XPCJSRuntime.cpp +3 −12 Original line number Diff line number Diff line Loading @@ -1197,7 +1197,7 @@ XPCJSRuntime::~XPCJSRuntime() } static void GetCompartmentName(JSCompartment *c, bool getAddress, nsCString &name) GetCompartmentName(JSCompartment *c, nsCString &name) { if (js::IsAtomsCompartment(c)) { name.AssignLiteral("atoms"); Loading @@ -1205,9 +1205,6 @@ GetCompartmentName(JSCompartment *c, bool getAddress, nsCString &name) nsJSPrincipals::get(principals)->GetScriptLocation(name); // For system compartments we append the location, if there is one. // And we append the address if |getAddress| is true, so that // multiple system compartments (and there can be many) can be // distinguished. if (js::IsSystemCompartment(c)) { xpc::CompartmentPrivate *compartmentPrivate = static_cast<xpc::CompartmentPrivate*>(JS_GetCompartmentPrivate(c)); Loading @@ -1215,12 +1212,6 @@ GetCompartmentName(JSCompartment *c, bool getAddress, nsCString &name) name.AppendLiteral(", "); name.Append(compartmentPrivate->location); } if (getAddress) { // ample; 64-bit address max is 18 chars nsPrintfCString address(", 0x%llx", PRUint64(c)); name.Append(address); } } // A hack: replace forward slashes with '\\' so they aren't Loading Loading @@ -1641,7 +1632,7 @@ class JSCompartmentsMultiReporter : public nsIMemoryMultiReporter // silently ignore OOM errors Paths *paths = static_cast<Paths *>(data); nsCString path; GetCompartmentName(c, /* getAddress = */ false, path); GetCompartmentName(c, path); path.Insert(js::IsSystemCompartment(c) ? NS_LITERAL_CSTRING("compartments/system/") : NS_LITERAL_CSTRING("compartments/user/"), Loading Loading @@ -1698,7 +1689,7 @@ struct XPCJSRuntimeStats : public JS::RuntimeStats { virtual void initExtraCompartmentStats(JSCompartment *c, JS::CompartmentStats *cstats) MOZ_OVERRIDE { nsCAutoString name; GetCompartmentName(c, /* getAddress = */ true, name); GetCompartmentName(c, name); cstats->extra = strdup(name.get()); } }; Loading Loading
js/xpconnect/src/XPCJSRuntime.cpp +3 −12 Original line number Diff line number Diff line Loading @@ -1197,7 +1197,7 @@ XPCJSRuntime::~XPCJSRuntime() } static void GetCompartmentName(JSCompartment *c, bool getAddress, nsCString &name) GetCompartmentName(JSCompartment *c, nsCString &name) { if (js::IsAtomsCompartment(c)) { name.AssignLiteral("atoms"); Loading @@ -1205,9 +1205,6 @@ GetCompartmentName(JSCompartment *c, bool getAddress, nsCString &name) nsJSPrincipals::get(principals)->GetScriptLocation(name); // For system compartments we append the location, if there is one. // And we append the address if |getAddress| is true, so that // multiple system compartments (and there can be many) can be // distinguished. if (js::IsSystemCompartment(c)) { xpc::CompartmentPrivate *compartmentPrivate = static_cast<xpc::CompartmentPrivate*>(JS_GetCompartmentPrivate(c)); Loading @@ -1215,12 +1212,6 @@ GetCompartmentName(JSCompartment *c, bool getAddress, nsCString &name) name.AppendLiteral(", "); name.Append(compartmentPrivate->location); } if (getAddress) { // ample; 64-bit address max is 18 chars nsPrintfCString address(", 0x%llx", PRUint64(c)); name.Append(address); } } // A hack: replace forward slashes with '\\' so they aren't Loading Loading @@ -1641,7 +1632,7 @@ class JSCompartmentsMultiReporter : public nsIMemoryMultiReporter // silently ignore OOM errors Paths *paths = static_cast<Paths *>(data); nsCString path; GetCompartmentName(c, /* getAddress = */ false, path); GetCompartmentName(c, path); path.Insert(js::IsSystemCompartment(c) ? NS_LITERAL_CSTRING("compartments/system/") : NS_LITERAL_CSTRING("compartments/user/"), Loading Loading @@ -1698,7 +1689,7 @@ struct XPCJSRuntimeStats : public JS::RuntimeStats { virtual void initExtraCompartmentStats(JSCompartment *c, JS::CompartmentStats *cstats) MOZ_OVERRIDE { nsCAutoString name; GetCompartmentName(c, /* getAddress = */ true, name); GetCompartmentName(c, name); cstats->extra = strdup(name.get()); } }; Loading