Upon receiving 'give some memory back' request check if any corresponding callback set instead of asserting that.

This commit is contained in:
Ruben Ayrapetyan
2015-01-12 19:02:42 +03:00
parent f96770a811
commit d03b2dafba
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright 2014 Samsung Electronics Co., Ltd. Copyright 2014-2015 Samsung Electronics Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
+4 -3
View File
@@ -1,4 +1,4 @@
/* Copyright 2014 Samsung Electronics Co., Ltd. /* Copyright 2014-2015 Samsung Electronics Co., Ltd.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -166,9 +166,10 @@ void
mem_run_try_to_give_memory_back_callbacks (mem_try_give_memory_back_severity_t severity) /**< severity of mem_run_try_to_give_memory_back_callbacks (mem_try_give_memory_back_severity_t severity) /**< severity of
the request */ the request */
{ {
JERRY_ASSERT (mem_try_give_memory_back_callback != NULL); if (mem_try_give_memory_back_callback != NULL)
{
mem_try_give_memory_back_callback (severity); mem_try_give_memory_back_callback (severity);
}
} /* mem_run_try_to_give_memory_back_callbacks */ } /* mem_run_try_to_give_memory_back_callbacks */
#ifndef JERRY_NDEBUG #ifndef JERRY_NDEBUG