1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Check the return values of JS_SetPrivate and JS_DefineProperties in

get_cache_entry_object.
This commit is contained in:
Miciah Dashiel Butler Masters 2005-12-20 10:44:51 +00:00 committed by Miciah Dashiel Butler Masters
parent 9559871fd0
commit be76bed022

View File

@ -146,9 +146,10 @@ get_cache_entry_object(struct cache_entry *cached)
if (!cache_entry_object) return NULL;
JS_SetPrivate(smjs_ctx, cache_entry_object, cached);
JS_DefineProperties(smjs_ctx, cache_entry_object,
(JSPropertySpec *) cache_entry_props);
if (JS_FALSE != JS_SetPrivate(smjs_ctx, cache_entry_object, cached)
&& JS_FALSE != JS_DefineProperties(smjs_ctx, cache_entry_object,
(JSPropertySpec *) cache_entry_props))
return cache_entry_object;
return cache_entry_object;
return NULL;
}