author | Jeff Walden <jwalden@mit.edu> |
Thu, 12 Apr 2012 18:32:25 -0700 | |
changeset 91615 | 94eb880e0cad9382f650d7437c01dd096e029099 |
parent 91614 | 95fd0e0254396ec64d0f568e40ad58525fa28fb8 |
child 91616 | 0b01ee2e0e7d25175528d832248c243603c69e91 |
push id | 22465 |
push user | mak77@bonardo.net |
push date | Sat, 14 Apr 2012 11:58:29 +0000 |
treeherder | mozilla-central@6880c195054f [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | gcc-42-should-die |
milestone | 14.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
|
js/src/jsstr.cpp | file | annotate | diff | comparison | revisions |
--- 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; }