зеркало из https://github.com/mozilla/gecko-dev.git
Bug 345993 - Make the full Build ID more accessible to testers. patch=zach, r=rob_strong, sr=jst
This commit is contained in:
Родитель
f2ac5c5767
Коммит
8fd3f51fc5
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "domstubs.idl"
|
||||
|
||||
[scriptable, uuid(8758b72b-63d4-4685-b908-4275126410fb)]
|
||||
[scriptable, uuid(8e150a70-3e51-45df-bee3-77505fbe016c)]
|
||||
interface nsIDOMNavigator : nsISupports
|
||||
{
|
||||
readonly attribute DOMString appCodeName;
|
||||
|
@ -58,6 +58,7 @@ interface nsIDOMNavigator : nsISupports
|
|||
readonly attribute DOMString userAgent;
|
||||
readonly attribute boolean cookieEnabled;
|
||||
readonly attribute boolean onLine;
|
||||
readonly attribute DOMString buildID;
|
||||
|
||||
boolean javaEnabled();
|
||||
boolean taintEnabled();
|
||||
|
|
|
@ -186,6 +186,8 @@
|
|||
static PRLogModuleInfo* gDOMLeakPRLog;
|
||||
#endif
|
||||
|
||||
#include "nsBuildID.h"
|
||||
|
||||
nsIFactory *nsGlobalWindow::sComputedDOMStyleFactory = nsnull;
|
||||
|
||||
static nsIEntropyCollector *gEntropyCollector = nsnull;
|
||||
|
@ -7876,6 +7878,18 @@ nsNavigator::GetOnLine(PRBool* aOnline)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNavigator::GetBuildID(nsAString& aBuildID)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
long buildID = NS_BUILD_ID;
|
||||
if (buildID) {
|
||||
aBuildID = NS_LITERAL_STRING(NS_STRINGIFY(NS_BUILD_ID));
|
||||
rv = NS_OK;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNavigator::JavaEnabled(PRBool *aReturn)
|
||||
{
|
||||
|
|
|
@ -75,7 +75,10 @@
|
|||
var list = document.getElementById("aboutPageList");
|
||||
var listItem = list.appendChild(document.createElement("li"));
|
||||
listItem.appendChild(document.createTextNode("&about.buildIdentifier;"));
|
||||
listItem.appendChild(document.createTextNode(ua));
|
||||
// replace the shortened 8-digit build id in the UA with the full 10-digit
|
||||
// build id from navigator.buildID
|
||||
var newUA = ua.replace(/\/\d{8}/, navigator.buildID);
|
||||
listItem.appendChild(document.createTextNode(newUA));
|
||||
}
|
||||
</script>
|
||||
</ul>
|
||||
|
|
Загрузка…
Ссылка в новой задаче