Attempt to fix OS X (gcc 4.2) build bustage. No bug, r=gcc-42-should-die
authorJeff Walden <jwalden@mit.edu>
Thu, 12 Apr 2012 18:32:25 -0700
changeset 94928 94eb880e0cad9382f650d7437c01dd096e029099
parent 94927 95fd0e0254396ec64d0f568e40ad58525fa28fb8
child 94929 0b01ee2e0e7d25175528d832248c243603c69e91
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcc-42-should-die
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Attempt to fix OS X (gcc 4.2) build bustage. No bug, r=gcc-42-should-die
js/src/jsstr.cpp
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -2644,20 +2644,23 @@ js::str_split(JSContext *cx, unsigned ar
         return true;
     }
     RootedVar<JSLinearString*> strlin(cx, str->ensureLinear(cx));
     if (!strlin)
         return false;
 
     /* 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;
 
     /* Step 16. */
     aobj->setType(type);
     args.rval() = ObjectValue(*aobj);
     return true;
 }