# HG changeset patch # User Atul Varma # Date 1245984825 25200 # Node ID 36d57955327eda6cce633fb24f50dfa491cc03f3 # Parent ed2cf86a7c9dbe382a070edd398743105a27d488 Removed wrapper.cpp's dependency on string.h. diff -r ed2cf86a7c9d -r 36d57955327e wrapper.cpp --- a/wrapper.cpp Thu Jun 25 18:56:23 2009 -0700 +++ b/wrapper.cpp Thu Jun 25 19:53:45 2009 -0700 @@ -36,8 +36,6 @@ #include "wrapper.h" -#include "string.h" - // Reserved slot ID for the resolver (meta) object #define SLOT_RESOLVER 0 @@ -114,8 +112,9 @@ return JS_FALSE; if (!JSVAL_IS_OBJECT(exception)) return JS_FALSE; - JSClass *klass = JS_GET_CLASS(cx, JSVAL_TO_OBJECT(exception)); - if (klass && strcmp(klass->name, "StopIteration") == 0) { + JSClass *clasp = JS_GET_CLASS(cx, JSVAL_TO_OBJECT(exception)); + if (clasp && + JSCLASS_CACHED_PROTO_KEY(clasp) == JSProto_StopIteration) { JS_ClearPendingException(cx); *statep = JSVAL_NULL; JS_RemoveRoot(cx, statep);