Rename the jerry_value_has_error_flag function. (#2290)
Rename the function to represent it's real functionality. JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
This commit is contained in:
committed by
László Langó
parent
d672d1e71c
commit
ba2e49caaa
@@ -34,7 +34,7 @@ DECLARE_GLOBAL_FUNCTION(setInterval) {
|
||||
|
||||
jerry_value_t result = jerry_set_property_by_index(function_obj_p, id, args[0]);
|
||||
|
||||
if (jerry_value_has_error_flag(result)) {
|
||||
if (jerry_value_is_error(result)) {
|
||||
jerry_release_value(result);
|
||||
mbed::js::EventLoop::getInstance().getQueue().cancel(id);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ DECLARE_GLOBAL_FUNCTION(setTimeout) {
|
||||
|
||||
jerry_value_t result = jerry_set_property_by_index(function_obj_p, id, args[0]);
|
||||
|
||||
if (jerry_value_has_error_flag(result)) {
|
||||
if (jerry_value_is_error(result)) {
|
||||
jerry_release_value(result);
|
||||
mbed::js::EventLoop::getInstance().getQueue().cancel(id);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ static int load_javascript() {
|
||||
|
||||
jerry_value_t parsed_code = jerry_parse(NULL, 0, code, length, JERRY_PARSE_NO_OPTS);
|
||||
|
||||
if (jerry_value_has_error_flag(parsed_code)) {
|
||||
if (jerry_value_is_error(parsed_code)) {
|
||||
LOG_PRINT_ALWAYS("jerry_parse failed [%s]\r\n", js_codes[src].name);
|
||||
jerry_release_value(parsed_code);
|
||||
jsmbed_js_exit();
|
||||
@@ -54,7 +54,7 @@ static int load_javascript() {
|
||||
jerry_value_t returned_value = jerry_run(parsed_code);
|
||||
jerry_release_value(parsed_code);
|
||||
|
||||
if (jerry_value_has_error_flag(returned_value)) {
|
||||
if (jerry_value_is_error(returned_value)) {
|
||||
LOG_PRINT_ALWAYS("jerry_run failed [%s]\r\n", js_codes[src].name);
|
||||
jerry_release_value(returned_value);
|
||||
jsmbed_js_exit();
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ bool jsmbed_wrap_register_global_function(const char* name, jerry_external_handl
|
||||
return is_ok;
|
||||
}
|
||||
|
||||
if (jerry_value_has_error_flag(reg_function)) {
|
||||
if (jerry_value_is_error(reg_function)) {
|
||||
is_ok = false;
|
||||
LOG_PRINT_ALWAYS("Error: jerry_create_external_function has error flag! \r\n");
|
||||
jerry_release_value(global_object_val);
|
||||
@@ -45,7 +45,7 @@ bool jsmbed_wrap_register_global_function(const char* name, jerry_external_handl
|
||||
jerry_value_t set_result = jerry_set_property(global_object_val, jerry_name, reg_function);
|
||||
|
||||
|
||||
if (jerry_value_has_error_flag(set_result)) {
|
||||
if (jerry_value_is_error(set_result)) {
|
||||
is_ok = false;
|
||||
LOG_PRINT_ALWAYS("Error: jerry_create_external_function failed: [%s]\r\n", name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user