Bug 893890 - Don't attach new object metadata to objects created while parsing/emitting scripts, r=luke.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 26 Jul 2013 14:15:37 -0600
changeset 140202 fb48c7d58b8b
parent 140201 60542f3605e3
child 140203 a0c2043c95e3
child 140213 5f7438a285d0
child 140241 49a09ddadf6c
child 140254 4874fa438b1c
push id25016
push userryanvm@gmail.com
push date2013-07-27 02:25 +0000
treeherdermozilla-central@fb48c7d58b8b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs893890
milestone25.0a1
first release with
nightly linux32
fb48c7d58b8b / 25.0a1 / 20130727030206 / files
nightly linux64
fb48c7d58b8b / 25.0a1 / 20130727030206 / files
nightly mac
fb48c7d58b8b / 25.0a1 / 20130727030206 / files
nightly win32
fb48c7d58b8b / 25.0a1 / 20130727030206 / files
nightly win64
fb48c7d58b8b / 25.0a1 / 20130727030206 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 893890 - Don't attach new object metadata to objects created while parsing/emitting scripts, r=luke.
js/src/jsobjinlines.h
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -1188,21 +1188,22 @@ DefineConstructorAndPrototype(JSContext 
                               const JSPropertySpec *static_ps, const JSFunctionSpec *static_fs,
                               JSObject **ctorp = NULL,
                               gc::AllocKind ctorKind = JSFunction::FinalizeKind);
 
 static JS_ALWAYS_INLINE bool
 NewObjectMetadata(ExclusiveContext *cxArg, JSObject **pmetadata)
 {
     // The metadata callback is invoked before each created object, except when
-    // analysis is active as the callback may reenter JS.
+    // analysis/compilation/parsing is active as the callback may reenter JS.
     JS_ASSERT(!*pmetadata);
     if (JSContext *cx = cxArg->maybeJSContext()) {
         if (JS_UNLIKELY((size_t)cx->compartment()->objectMetadataCallback) &&
-            !cx->compartment()->activeAnalysis)
+            !cx->compartment()->activeAnalysis &&
+            !cx->runtime()->mainThread.activeCompilations)
         {
             gc::AutoSuppressGC suppress(cx);
             return cx->compartment()->objectMetadataCallback(cx, pmetadata);
         }
     }
     return true;
 }