Bug 478219. Put a script blocker around delayed editor init. r+sr=sicking
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 16 Mar 2009 07:50:04 -0400
changeset 26231 29a714ae9d11b160584113d30e4eee5b791f32ba
parent 26230 6b18611d2a9f9c9d23ec30d906f9fb86d30a315c
child 26232 a7735a970ac2053ff519c07881dfe791de036071
push id5962
push userbzbarsky@mozilla.com
push dateMon, 16 Mar 2009 14:37:22 +0000
treeherdermozilla-central@29a714ae9d11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs478219
milestone1.9.2a1pre
Bug 478219. Put a script blocker around delayed editor init. r+sr=sicking
layout/forms/nsTextControlFrame.cpp
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -1381,16 +1381,20 @@ nsTextControlFrame::CalcIntrinsicSize(ns
   }
 
   return NS_OK;
 }
 
 void
 nsTextControlFrame::DelayedEditorInit()
 {
+  // Make sure that editor init doesn't do things that would kill us off
+  // (especially off the script blockers it'll create for its DOM mutations).
+  nsAutoScriptBlocker scriptBlocker;
+
   // Time to mess with our security context... See comments in GetValue()
   // for why this is needed.
   nsCxPusher pusher;
   pusher.PushNull();
 
   InitEditor();
   // Notify the text listener we have focus and setup the caret etc (bug 446663).
   if (IsFocusedContent(PresContext(), GetContent())) {