Bug 1012642 - Trigger a read barrier earlier when copying RegExpShared from one object to another, r=billm.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 20 May 2014 16:12:49 -0700
changeset 184033 8eaf03433640bb0d7d069f2ddee8ecf53e53ca58
parent 184032 bb2b4df7cc652f6b1d496e44eff5923a4b3e4165
child 184034 f59c69bb0c7ac1e906382e6304e761a1fa38ecd0
push id26810
push usercbook@mozilla.com
push dateWed, 21 May 2014 11:46:36 +0000
treeherdermozilla-central@50fb8c4db2fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1012642
milestone32.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
Bug 1012642 - Trigger a read barrier earlier when copying RegExpShared from one object to another, r=billm.
js/src/vm/RegExpObject.cpp
--- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp
@@ -124,16 +124,17 @@ RegExpObjectBuilder::clone(Handle<RegExp
         RegExpFlag newFlags = RegExpFlag(origFlags | staticsFlags);
         Rooted<JSAtom *> source(cx, other->getSource());
         return build(source, newFlags);
     }
 
     RegExpGuard g(cx);
     if (!other->getShared(cx, &g))
         return nullptr;
+    g.re()->prepareForUse(cx);
 
     Rooted<JSAtom *> source(cx, other->getSource());
     return build(source, *g);
 }
 
 /* MatchPairs */
 
 bool