From 189a897f22a0839792354c78281233297d43b069 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Thu, 12 Apr 2012 18:32:25 -0700 Subject: [PATCH] Attempt to fix OS X (gcc 4.2) build bustage. No bug, r=gcc-42-should-die --- js/src/jsstr.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index 5362c6a080d..ba2fde6c1c5 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -2648,10 +2648,13 @@ js::str_split(JSContext *cx, unsigned argc, Value *vp) /* Steps 11-15. */ JSObject *aobj; - if (!re.initialized()) - aobj = SplitHelper(cx, strlin, limit, SplitStringMatcher(cx, sepstr), type); - else - aobj = SplitHelper(cx, strlin, limit, SplitRegExpMatcher(*re, cx->regExpStatics()), type); + if (!re.initialized()) { + SplitStringMatcher matcher(cx, sepstr); + aobj = SplitHelper(cx, strlin, limit, matcher, type); + } else { + SplitRegExpMatcher matcher(*re, cx->regExpStatics()); + aobj = SplitHelper(cx, strlin, limit, matcher, type); + } if (!aobj) return false;