Bug 552905 - JS_DefineUCFunction seems to be missing a CHECK_REQUEST. r=jorendorff.
authortimeless@mozdev.org
Tue, 23 Mar 2010 09:41:43 -0500
changeset 40340 99f1e94c77a302c5c103410ee2e36cb2735a0e42
parent 40339 cdcdaf01be6ce6eb346874e839b8cc4f92b2ea2b
child 40341 6dcce4f4d9dd29b868168cde5384756d1aa53921
push id12610
push userrsayre@mozilla.com
push dateMon, 05 Apr 2010 17:26:41 +0000
treeherdermozilla-central@1942c0b4e101 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs552905
milestone1.9.3a3pre
Bug 552905 - JS_DefineUCFunction seems to be missing a CHECK_REQUEST. r=jorendorff.
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -4422,16 +4422,17 @@ JS_DefineFunction(JSContext *cx, JSObjec
 
 JS_PUBLIC_API(JSFunction *)
 JS_DefineUCFunction(JSContext *cx, JSObject *obj,
                     const jschar *name, size_t namelen, JSNative call,
                     uintN nargs, uintN attrs)
 {
     JSAtom *atom;
 
+    CHECK_REQUEST(cx);
     atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name, namelen), 0);
     if (!atom)
         return NULL;
     return js_DefineFunction(cx, obj, atom, call, nargs, attrs);
 }
 
 JS_PUBLIC_API(JSScript *)
 JS_CompileScript(JSContext *cx, JSObject *obj,