From edf618660eb5918f98ac5b7701f87f28c3cd819f Mon Sep 17 00:00:00 2001 From: Zbigniew Braniecki Date: Wed, 13 Jul 2011 19:00:04 +0200 Subject: [PATCH 1/3] Bug 668842 - Add locale to telemetry metadata; r=rstrong,tglek --- toolkit/components/telemetry/TelemetryPing.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/toolkit/components/telemetry/TelemetryPing.js b/toolkit/components/telemetry/TelemetryPing.js index aa458429f701..c0f0a4db3ada 100644 --- a/toolkit/components/telemetry/TelemetryPing.js +++ b/toolkit/components/telemetry/TelemetryPing.js @@ -63,6 +63,12 @@ const MEM_HISTOGRAMS = { "page-faults-hard": "PAGE_FAULTS_HARD" }; +function getLocale() { + return Cc["@mozilla.org/chrome/chrome-registry;1"]. + getService(Ci.nsIXULChromeRegistry). + getSelectedLocale('global'); +} + XPCOMUtils.defineLazyGetter(this, "Telemetry", function () { return Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); }); @@ -143,6 +149,7 @@ function getMetadata(reason) { appName: ai.name, appBuildID: ai.appBuildID, platformBuildID: ai.platformBuildID, + locale: getLocale(), }; // sysinfo fields is not always available, get what we can. From 00a4399c69837f5290a8338a881db4c51f8fd8f3 Mon Sep 17 00:00:00 2001 From: Myk Melez Date: Wed, 13 Jul 2011 22:28:56 +0200 Subject: [PATCH 2/3] update revision of Add-on SDK tests to latest tip; test-only --- testing/jetpack/jetpack-location.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/jetpack/jetpack-location.txt b/testing/jetpack/jetpack-location.txt index c4d34d283585..9d21bacf308b 100644 --- a/testing/jetpack/jetpack-location.txt +++ b/testing/jetpack/jetpack-location.txt @@ -1 +1 @@ -http://hg.mozilla.org/projects/addon-sdk/archive/19b2d58d7fa6.tar.bz2 +http://hg.mozilla.org/projects/addon-sdk/archive/49e4c09bca42.tar.bz2 From 5b082f6f564f833860e41db133629ce676caa32a Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Wed, 13 Jul 2011 16:57:41 -0400 Subject: [PATCH 3/3] Bug 669767: Add scriptblocker to EditorInitializer::Run() so our frame doesn't get killed before we finish. r=ehsan --- layout/forms/crashtests/669767.html | 14 ++++++++++++++ layout/forms/crashtests/crashtests.list | 1 + layout/forms/nsTextControlFrame.h | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 layout/forms/crashtests/669767.html diff --git a/layout/forms/crashtests/669767.html b/layout/forms/crashtests/669767.html new file mode 100644 index 000000000000..f41a9125c24e --- /dev/null +++ b/layout/forms/crashtests/669767.html @@ -0,0 +1,14 @@ + + +Untitled + + + + + + + + diff --git a/layout/forms/crashtests/crashtests.list b/layout/forms/crashtests/crashtests.list index e39391aaed54..dad087740ba8 100644 --- a/layout/forms/crashtests/crashtests.list +++ b/layout/forms/crashtests/crashtests.list @@ -46,3 +46,4 @@ asserts(1) load 578604-1.html # bug 584564 asserts(3-5) load 590302-1.xhtml # bug 584564 load 626014.xhtml load 639733.xhtml +load 669767.html diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h index 638c69812041..1d93f5ea53b6 100644 --- a/layout/forms/nsTextControlFrame.h +++ b/layout/forms/nsTextControlFrame.h @@ -295,12 +295,18 @@ protected: NS_IMETHOD Run() { if (mFrame) { + // need to block script to avoid bug 669767 + nsAutoScriptBlocker scriptBlocker; + nsCOMPtr shell = mFrame->PresContext()->GetPresShell(); PRBool observes = shell->ObservesNativeAnonMutationsForPrint(); shell->ObserveNativeAnonMutationsForPrint(PR_TRUE); + // This can cause the frame to be destroyed (and call Revoke() mFrame->EnsureEditorInitialized(); shell->ObserveNativeAnonMutationsForPrint(observes); + + NS_ASSERTION(mFrame,"Frame destroyed even though we had a scriptblocker"); mFrame->FinishedInitializer(); } return NS_OK;