Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 78ed2704cd625b73cfb5671e7ae2e1400deea2a6 1 parent d1885a8
@rocallahan rocallahan authored
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.
Please sign in to comment.
Something went wrong with that request. Please try again.