# HG changeset patch # User Atul Varma # Date 1245711277 25200 # Node ID be05a91e7b0aacdaad1b69d4d95363b9e95ffbee # Parent 5899faf625d48039cfaf6ac79ce2aba21534fda1 Fixed TODOs in wrapper.cpp. diff -r 5899faf625d4 -r be05a91e7b0a wrapper.cpp --- a/wrapper.cpp Mon Jun 22 15:40:46 2009 -0700 +++ b/wrapper.cpp Mon Jun 22 15:54:37 2009 -0700 @@ -98,7 +98,7 @@ return JS_FALSE; } *idp = JSVAL_ZERO; - // TODO: Root the enumeration iterator? + JS_AddRoot(cx, statep); return JS_TRUE; } // TODO: Default behavior? @@ -118,7 +118,7 @@ if (klass && strcmp(klass->name, "StopIteration") == 0) { JS_ClearPendingException(cx); *statep = JSVAL_NULL; - // TODO: Unroot the enumeration iterator? + JS_RemoveRoot(cx, statep); return JS_TRUE; } } @@ -128,7 +128,7 @@ return JS_FALSE; return JS_TRUE; case JSENUMERATE_DESTROY: - // TODO: Unroot the enumeration iterator? + JS_RemoveRoot(cx, statep); return JS_TRUE; } }