зеркало из https://github.com/mozilla/gecko-dev.git
Bug 522668 - support check and fix place database in about:support; r=adw
MozReview-Commit-ID: 8HTyEnBN5oJ
This commit is contained in:
Родитель
2cb73f417b
Коммит
a5ba3af523
|
@ -14,6 +14,8 @@ Cu.import("resource://gre/modules/AppConstants.jsm");
|
|||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
|
||||
"resource://gre/modules/PluralForm.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesDBUtils",
|
||||
"resource://gre/modules/PlacesDBUtils.jsm");
|
||||
|
||||
window.addEventListener("load", function onload(event) {
|
||||
try {
|
||||
|
@ -920,4 +922,12 @@ function setupEventListeners(){
|
|||
safeModeRestart();
|
||||
}
|
||||
});
|
||||
$("verify-place-integrity-button").addEventListener("click", function (event){
|
||||
PlacesDBUtils.checkAndFixDatabase(function(aLog) {
|
||||
let msg = aLog.join("\n");
|
||||
$("verify-place-result").style.display = "block";
|
||||
$("verify-place-result").classList.remove("no-copy");
|
||||
$("verify-place-result").textContent = msg;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -406,6 +406,27 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.placeDatabaseTitle;
|
||||
</h2>
|
||||
|
||||
<table>
|
||||
<tr class="no-copy">
|
||||
<th class="column">
|
||||
&aboutSupport.placeDatabaseIntegrity;
|
||||
</th>
|
||||
|
||||
<td>
|
||||
<button id="verify-place-integrity-button">
|
||||
&aboutSupport.placeDatabaseVerifyIntegrity;
|
||||
</button>
|
||||
<pre id="verify-place-result" class="hidden no-copy"></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.jsTitle;
|
||||
|
|
|
@ -89,6 +89,10 @@ variant of aboutSupport.showDir.label. -->
|
|||
|
||||
<!ENTITY aboutSupport.graphicsTitle "Graphics">
|
||||
|
||||
<!ENTITY aboutSupport.placeDatabaseTitle "Places Database">
|
||||
<!ENTITY aboutSupport.placeDatabaseIntegrity "Integrity">
|
||||
<!ENTITY aboutSupport.placeDatabaseVerifyIntegrity "Verify Integrity">
|
||||
|
||||
<!ENTITY aboutSupport.jsTitle "JavaScript">
|
||||
<!ENTITY aboutSupport.jsIncrementalGC "Incremental GC">
|
||||
|
||||
|
|
|
@ -117,6 +117,11 @@ td {
|
|||
display: block;
|
||||
}
|
||||
|
||||
#verify-place-result {
|
||||
max-height: 200px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче