From 3439586c22b57fb5d6325f96be33a39e98958a92 Mon Sep 17 00:00:00 2001 From: Po-Chun Chang Date: Mon, 12 Aug 2013 08:52:01 -0400 Subject: [PATCH] Bug 898692 - Avoid wasted work in ArrayBufferObject::obj_trace(). r=sphink --- js/src/vm/TypedArrayObject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index 17305b8f1c36..f137b4a10d1d 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -704,9 +704,11 @@ ArrayBufferObject::obj_trace(JSTracer *trc, JSObject *obj) p = GetViewList(p)->bufferLink()) { if (p == obj) + { + JS_ASSERT(!found); found = true; + } } - JS_ASSERT(found); #endif } }