use macro to compare

This commit is contained in:
Vincent Sanders 2012-11-28 22:08:11 +00:00
parent 4fbeacf830
commit 71577f214d

View File

@ -225,9 +225,6 @@ operation dispatchEvent %{
*/
/* caution, this must match the struct generated from event.bnd */
if (event == JSVAL_VOID) {
jsret = JS_FALSE;
} else {
struct {
dom_event *event;
} *event_private;
@ -249,13 +246,12 @@ operation dispatchEvent %{
JS_GetProperty(cx, JSAPI_THIS_OBJECT(cx, vp), "onload", &eventval);
}
if (eventval != JSVAL_VOID) {
if (JSVAL_IS_VOID(eventval)) {
event_argv[0] = eventval;
jsret = JS_CallFunctionValue(cx, NULL, eventval, 1, event_argv, &event_rval);
}
}
}
}
%}
getter EventHandler %{