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:
parent
9559871fd0
commit
be76bed022
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user