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 152487 fb48c7d58b8be9ce281d9dc032aaa10d5125efd0
parent 152486 60542f3605e380b38582e6cab5ff6cb53aa75ac6
child 152488 a0c2043c95e392dd509c522e40c92b59ba56a4af
child 152491 5f7438a285d0f8335366b99111728f1934def219
child 152519 49a09ddadf6ce4cb1e7cc186410531a432c7c3bc
child 152532 4874fa438b1c9316ae97485a28531959149465a3
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [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;
 }