Permalink
Browse files

Bug 839270. Add padding code to nsStyleContext::AddChild to try to wo…

…rk around mysterious crash bug. r=dbaron,a=akeybl
  • Loading branch information...
1 parent d1885a8 commit 78ed2704cd625b73cfb5671e7ae2e1400deea2a6 @rocallahan rocallahan committed Feb 12, 2013
Showing with 11 additions and 0 deletions.
  1. +11 −0 layout/style/nsStyleContext.cpp
View
11 layout/style/nsStyleContext.cpp
@@ -107,6 +107,17 @@ void nsStyleContext::AddChild(nsStyleContext* aChild)
aChild->mNextSibling == aChild,
"child already in a child list");
+#if defined(_WIN32) && defined(_MSC_VER)
+#define NOPS_8 __asm nop __asm nop __asm nop __asm nop __asm nop __asm nop __asm nop __asm nop
+#define NOPS_64 NOPS_8 NOPS_8 NOPS_8 NOPS_8 NOPS_8 NOPS_8 NOPS_8 NOPS_8
+ __asm jmp AddChildSuperHack
+ NOPS_64
+ NOPS_64
+ NOPS_64
+ NOPS_64
+ __asm AddChildSuperHack:
+#endif
+
nsStyleContext **list = aChild->mRuleNode->IsRoot() ? &mEmptyChild : &mChild;
// Insert at the beginning of the list. See also FindChildWithRules.

0 comments on commit 78ed270

Please sign in to comment.