Bug 454142. r=brendan, r=igor, a=beltzner
authorBlake Kaplan <mrbkap@gmail.com>
Fri, 28 Nov 2008 18:15:06 -0800
changeset 22120 a2c5f14c8d3339eb5d236f60d5a21b4e4aa0f4fb
parent 22119 120131b3a0861fc7fed70737e0974f4ddd56b5f4
child 22121 4cfa752afa85bd81a29a5ef0826661bc81ecee5a
push id3806
push usersdwilsh@shawnwilsher.com
push dateSat, 29 Nov 2008 02:20:30 +0000
treeherdermozilla-central@4cfa752afa85 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbrendan, igor, beltzner
bugs454142
milestone1.9.1b3pre
Bug 454142. r=brendan, r=igor, a=beltzner
js/src/jsscope.cpp
--- a/js/src/jsscope.cpp
+++ b/js/src/jsscope.cpp
@@ -1258,19 +1258,21 @@ js_AddScopeProperty(JSContext *cx, JSSco
 
         /*
          * Check for a watchpoint on a deleted property; if one exists, change
          * setter to js_watch_set.
          * XXXbe this could get expensive with lots of watchpoints...
          */
         if (!JS_CLIST_IS_EMPTY(&cx->runtime->watchPointList) &&
             js_FindWatchPoint(cx->runtime, scope, id)) {
-            JS_PUSH_TEMP_ROOT_SPROP(cx, overwriting, &tvr);
+            if (overwriting)
+                JS_PUSH_TEMP_ROOT_SPROP(cx, overwriting, &tvr);
             setter = js_WrapWatchedSetter(cx, id, attrs, setter);
-            JS_POP_TEMP_ROOT(cx, &tvr);
+            if (overwriting)
+                JS_POP_TEMP_ROOT(cx, &tvr);
             if (!setter)
                 goto fail_overwrite;
         }
 
         /* Find or create a property tree node labeled by our arguments. */
         child.id = id;
         child.getter = getter;
         child.setter = setter;