@@ -2362,9 +2362,6 @@ JSObject::growSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32_t
23622362 */
23632363 JS_ASSERT (newCount < NELEMENTS_LIMIT );
23642364
2365- size_t oldSize = Probes::objectResizeActive () ? obj->computedSizeOfThisSlotsElements () : 0 ;
2366- size_t newSize = oldSize + (newCount - oldCount) * sizeof (Value);
2367-
23682365 /*
23692366 * If we are allocating slots for an object whose type is always created
23702367 * by calling 'new' on a particular script, bump the GC kind for that
@@ -2394,8 +2391,6 @@ JSObject::growSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32_t
23942391 if (!obj->slots )
23952392 return false ;
23962393 Debug_SetSlotRangeToCrashOnTouch (obj->slots , newCount);
2397- if (Probes::objectResizeActive ())
2398- Probes::resizeObject (cx, obj, oldSize, newSize);
23992394 return true ;
24002395 }
24012396
@@ -2413,9 +2408,6 @@ JSObject::growSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32_t
24132408 if (changed && obj->isGlobal ())
24142409 types::MarkObjectStateChange (cx, obj);
24152410
2416- if (Probes::objectResizeActive ())
2417- Probes::resizeObject (cx, obj, oldSize, newSize);
2418-
24192411 return true ;
24202412}
24212413
@@ -2433,14 +2425,9 @@ JSObject::shrinkSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32
24332425 if (obj->isCall ())
24342426 return ;
24352427
2436- size_t oldSize = Probes::objectResizeActive () ? obj->computedSizeOfThisSlotsElements () : 0 ;
2437- size_t newSize = oldSize - (oldCount - newCount) * sizeof (Value);
2438-
24392428 if (newCount == 0 ) {
24402429 js_free (obj->slots );
24412430 obj->slots = NULL ;
2442- if (Probes::objectResizeActive ())
2443- Probes::resizeObject (cx, obj, oldSize, newSize);
24442431 return ;
24452432 }
24462433
@@ -2456,9 +2443,6 @@ JSObject::shrinkSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32
24562443 /* Watch for changes in global object slots, as for growSlots. */
24572444 if (changed && obj->isGlobal ())
24582445 types::MarkObjectStateChange (cx, obj);
2459-
2460- if (Probes::objectResizeActive ())
2461- Probes::resizeObject (cx, obj, oldSize, newSize);
24622446}
24632447
24642448/* static */ bool
@@ -2655,16 +2639,11 @@ JSObject::maybeDensifySparseElements(JSContext *cx, HandleObject obj)
26552639bool
26562640JSObject::growElements (JSContext *cx, unsigned newcap)
26572641{
2658- size_t oldSize = Probes::objectResizeActive () ? computedSizeOfThisSlotsElements () : 0 ;
2659-
26602642 if (!growElements (&cx->zone ()->allocator , newcap)) {
26612643 JS_ReportOutOfMemory (cx);
26622644 return false ;
26632645 }
26642646
2665- if (Probes::objectResizeActive ())
2666- Probes::resizeObject (cx, this , oldSize, computedSizeOfThisSlotsElements ());
2667-
26682647 return true ;
26692648}
26702649
@@ -2741,8 +2720,6 @@ JSObject::shrinkElements(JSContext *cx, unsigned newcap)
27412720 uint32_t oldcap = getDenseCapacity ();
27422721 JS_ASSERT (newcap <= oldcap);
27432722
2744- size_t oldSize = Probes::objectResizeActive () ? computedSizeOfThisSlotsElements () : 0 ;
2745-
27462723 /* Don't shrink elements below the minimum capacity. */
27472724 if (oldcap <= SLOT_CAPACITY_MIN || !hasDynamicElements ())
27482725 return ;
@@ -2758,9 +2735,6 @@ JSObject::shrinkElements(JSContext *cx, unsigned newcap)
27582735
27592736 newheader->capacity = newcap;
27602737 elements = newheader->elements ();
2761-
2762- if (Probes::objectResizeActive ())
2763- Probes::resizeObject (cx, this , oldSize, computedSizeOfThisSlotsElements ());
27642738}
27652739
27662740static JSObject *
0 commit comments