Commit Graph

59428 Commits

Author SHA1 Message Date
Marcel Hollerbach 5337d908e4 elm: register legacy_type correctly
Summary:
What happened before is that we registered efl_ui_leyout_legacy for
"elm_layout", which is not that good, since checking a (lets say) elm_button, for the type "elm_layout" would result in false. The same is with elm_button.

fixes T7081

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7081

Differential Revision: https://phab.enlightenment.org/D6430
2018-06-26 12:21:55 -04:00
Mike Blumenkrantz b0cb3b935a eina/threadqueue: use mempool_del for hash free function
Summary:
I typod this in 14ae3e3dec and when using
mempools other than chained, this probably caused all apps to crash on
shutdown

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6428
2018-06-25 17:55:25 -04:00
Mike Blumenkrantz 6eaa57852a ecore/thread: greatly reduce usleep time during shutdown loop
Summary:
now that ecore accurately waits on all threads while exiting, this
loop needs to run much more frequently in order to avoid waiting for
an unreasonably long time when exiting

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6427
2018-06-25 17:27:18 -04:00
Mike Blumenkrantz 1dc706a3dd ecore/thread: track "no_queue" threads
these threads are still managed by the main loop, meaning they must be
accounted for so that they can be waited on if necessary during shutdown

this resolves some issues where ecore-con threads would persist after the
main thread had exited or called ecore_shutdown

@fix
fix T7041

this is the final version of the patch and not the mangled version which
was previously committed

Differential Revision: https://phab.enlightenment.org/D6354
2018-06-25 16:54:24 -04:00
Mike Blumenkrantz 8d2f5d7a7d Revert "ecore/thread: track "no_queue" threads"
This reverts commit 1e47db6a71.

somehow arc managed to land an old revision of this which was not consistent
with the final version of D6354
2018-06-25 16:53:40 -04:00
Mike Blumenkrantz 32cebe903d tests: split a large failure case for eina_file tests to provide more info
Summary:
each failure case should always be separate in order to provide the highest
degree of detail available if a test fails

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6373
2018-06-25 15:20:37 -04:00
Mike Blumenkrantz 83bab7cab4 eina/lock: add errno wrapping for backtrace() calls in thread debug blocks
Summary:
somehow backtrace() is able to generate EINVAL in certain cases even though
this is not documented anywhere. these irrelevant errors should not be noticed
by users of the api during debugging, as this can cause some tests/apps to
randomly fail without explanation

@fix

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6377
2018-06-25 15:20:37 -04:00
Mike Blumenkrantz 93228108ef elm/win: move trigger for "shot" to first pre-render callback
Summary:
in the case where the first render took far longer then the specified
shot interval, this would end up recording garbage since there was nothing
drawn yet

@fix
fix T6929

Reviewers: bu5hm4n, JackDanielZ, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6929

Differential Revision: https://phab.enlightenment.org/D6426
2018-06-25 15:20:27 -04:00
Mike Blumenkrantz 7bbf18a950 edje: return available text data in part_text_get without recalc when possible
Summary:
based on the codepaths taken when setting text to a part, a recalc should
only be necessary when returning markup from a textblock, and this is only
the case because the function returns a non-allocated string

in the case where the object is textblock and (legacy || not fetching markup),
the current text is guaranteed to be set on this pointer. the reason a
recalc is necessary for the markup case is because edje TEXTBLOCK parts only
set text to the internal textblock during a recalc, meaning that attempting
to fetch text on a just-set part will fail; this does not mean that the internal
textblock object doesn't exist, only that the text has not yet been set to it
Depends on D6422

Reviewers: herdsman, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6423
2018-06-25 15:19:33 -04:00
Mike Blumenkrantz 6839003510 edje: remove recalc during part_recursive_get
Summary:
this adds perf overhead in order to work around a bug in text_get

all part objects are instantiated during edje_object_file_set, and forcing
a recalc here does nothing more than perform unnecessary operations

ref 8f95b17f39
ref D6365

Reviewers: herdsman, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6422
2018-06-25 15:18:56 -04:00
Mike Blumenkrantz b3b104a1e7 eina/debug_cpu: rework thread usage
Summary:
this changes the explicit pthread usage (and reimplementation of eina_thread_create)
to just use eina function calls. it also causes the thread to start and stop when
profiling is enabled and resolves some possible errors which could occur after
a fork or when trying to compile under windows

pthread usage: this code appears to have been 100% copied from eina_thread.c, and it
isn't clear to me why existing eina_thread api was not used. this has no functional
benefit, but it makes the code more readable

thread lifetime: there is no need to have a thread running at all times for a feature
which will be rarely used and which must be explicitly enabled by the user

windows: this file previously generated a lot of compiler warnings from unused functions
and variables since nothing here is available under windows. the entire file is now
a giant #ifndef _WIN32 to avoid any compile warnings or unexpected runtime behavior

fix T7055
Depends on D6371

Reviewers: ManMower, vtorri, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7055

Differential Revision: https://phab.enlightenment.org/D6372
2018-06-25 15:17:14 -04:00
Mike Blumenkrantz 3562878e21 eina/debug: replace some explicit pthread_t usage with Eina_Thread
no functional changes

Differential Revision: https://phab.enlightenment.org/D6371
2018-06-25 15:17:14 -04:00
Mike Blumenkrantz bea602f258 evas/thread_render: improve thread safety
this resolves some invalid read/write operations between threads without locking
and also attempts to improve thread-related behavior after fork() calls

ref T7027

Differential Revision: https://phab.enlightenment.org/D6370
2018-06-25 15:17:14 -04:00
Mike Blumenkrantz aedaa7ed19 eina/lock: rework meaning of EINA_DEBUG_THREADS variable
Summary:
previously this used to mean 'the number of ms that a lock can wait for
until abort() is called once the lock is acquired' and it was useful
when trying to find contention issues with locks

unfortunately this required a bit of reading into the code to determine,
and it made the common case of setting values to 1 fail in some cases,
as this is a very short amount of time. also the documentation explicitly
gives '1' as an example setting for this variable, which will cause immediate
abort() in most cases when debugging was enabled since things are much slower

this variable now is the number of usec that a lock can wait for before abort()
is called, and the lowest value that will be checked for abort()ing is 100, meaning
that '1' is valid again
Depends on D6375

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6376
2018-06-25 15:15:34 -04:00
Mike Blumenkrantz 6b91b6a389 eina/lock: when debug threads are enabled, always call trylock in lock function
Summary:
when debugging thread issues, it's not actually helpful to immediately
deadlock--this defeats any attempt at debugging. instead, call trylock first
in order to detect a possible deadlock and then throw an error which can be
caught by the user
Depends on D6374

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6375
2018-06-25 15:15:32 -04:00
Mike Blumenkrantz 73ba4006bd eina/lock: reorder inline posix lock functions
Summary: no functional changes

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6374
2018-06-25 15:15:29 -04:00
YeongJong Lee a522bf5d76 ecore_evas: prevent duplicated ecore_evas registration
Summary:
After a44697c37a, we can register same ecore_evas
to ecore_evases using ecore_evas_input_event_register.
(ecore_evas_input_event_register -> ecore_evas_done -> _ecore_evas_register)
This can make infinite loop in EINA_INLIST_FOREACH(ecore_evases, ee) because
next inlist of ecore_evases is ecore_evases after double call of
_ecore_evas_register.

This patch prevent it.

Test Plan:
Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 800, 600, NULL);
ecore_evas_input_event_register(ee);
(part of document of ecore_fb_input_device_window_set)

Check that there is no infinite loop

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6390
2018-06-25 15:14:31 -04:00
Mike Blumenkrantz 0e40fad446 ecore_con: make dns resolver thread stop blocking when canceled
Summary:
if the user or system attempts to cancel this thread then it should
stop blocking and exit in order to avoid potentially exiting after
efl has expected ecore-con to stop being active

@fix
fix T7041
Depends on D6354

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7041

Differential Revision: https://phab.enlightenment.org/D6355
2018-06-25 15:14:31 -04:00
Mike Blumenkrantz 1e47db6a71 ecore/thread: track "no_queue" threads
these threads are still managed by the main loop, meaning they must be
accounted for so that they can be waited on if necessary during shutdown

this resolves some issues where ecore-con threads would persist after the
main thread had exited or called ecore_shutdown

@fix
fix T7041

Differential Revision: https://phab.enlightenment.org/D6354
2018-06-25 15:14:31 -04:00
Mike Blumenkrantz 14ae3e3dec eina_thread_queue: use normal mempools for block allocation
there's no need to reimplement mempools here when we already have a great
mempool api

this makes the code slightly more readable

Differential Revision: https://phab.enlightenment.org/D6353
2018-06-25 15:14:30 -04:00
Mike Blumenkrantz 198016d503 ecore: reformat ecore_thread.c
no functional changes

Differential Revision: https://phab.enlightenment.org/D6352
2018-06-25 15:14:30 -04:00
Mike Blumenkrantz 51d0faec67 eo: remove some erroneous mutex unlocks during base class parent_set errors
recent changes added unlocks for these mutexes in some other places, so only
do the unlocks where necessary

fix T7020
2018-06-25 15:14:30 -04:00
Mike Blumenkrantz f4a55e9266 tests: add coverage for efl_parent_set with invalidated parent object
this hits a codepath which was otherwise never triggered by unit tests
2018-06-25 15:14:30 -04:00
Chris Michael 392668bdfb edje_lua: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6419

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6420
2018-06-25 11:36:52 -04:00
Chris Michael eed3e5dfe9 efl_ui_layout_pack: Wrap calls to edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6418

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6419
2018-06-25 11:36:52 -04:00
Chris Michael 580100d87d elm_clock: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6417

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6418
2018-06-25 11:36:52 -04:00
Chris Michael a1704700ac elm_calendar: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6416

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6417
2018-06-25 11:36:52 -04:00
Chris Michael 70b322b31b elc_popup: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6415

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6416
2018-06-25 11:36:51 -04:00
Chris Michael 42d97d0420 efl_ui_win: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6414

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6415
2018-06-25 11:36:51 -04:00
Chris Michael 7a7ab00955 elc_naviframe: Wrap calls to edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6413

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6414
2018-06-25 11:36:51 -04:00
Chris Michael f7064f9500 elc_multibuttonentry: Wrap calls to edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6412

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6413
2018-06-25 11:36:51 -04:00
Chris Michael 5a54a3d357 efl_ui_calendar: Wrap calls to edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6411

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6412
2018-06-25 11:36:40 -04:00
Chris Michael c1f3cf2a47 elm_spinner: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6410

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6411
2018-06-25 11:32:47 -04:00
Chris Michael 9724f671ed efl_ui_layout_object: Wrap calls to edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6409

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6410
2018-06-25 11:32:47 -04:00
Chris Michael 25aed20aed elm_access: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6407

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6408
2018-06-25 11:32:47 -04:00
Chris Michael c8770a54df elm_panel: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6406

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6407
2018-06-25 11:32:47 -04:00
Chris Michael 8ade8932ba efl_ui_view_list: Wrap calls to edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6404

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: bu5hm4n, cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6405
2018-06-25 11:32:47 -04:00
Chris Michael 9a9970ae62 tests: Update edje test to wrap edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6403

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6404
2018-06-25 11:32:33 -04:00
Chris Michael 561d22929c elementary_bin: Wrap calls to edje_object_part_object_get with edje_freeze/thaw
Summary: @ref T6884

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6402
2018-06-25 11:28:57 -04:00
Mike Blumenkrantz d2a703e7b8 tests: add some more failure cases for efl_parent_set in eo tests
ref T6837

Differential Revision: https://phab.enlightenment.org/D6358
2018-06-25 17:17:13 +02:00
Mike Blumenkrantz 02c62d3135 eo: remove some erroneous mutex unlocks during base class parent_set errors
recent changes added unlocks for these mutexes in some other places, so only
do the unlocks where necessary

fix T7020
Depends on D6356

Differential Revision: https://phab.enlightenment.org/D6357
2018-06-25 17:17:13 +02:00
Mike Blumenkrantz b2e3c483a8 tests: ensure class constructor is called in eo_domain test
failing to call this prior to the thread invocation would result in a CRI
from class initialization in a thread

ref T7003

Differential Revision: https://phab.enlightenment.org/D6333
2018-06-25 17:03:05 +02:00
Marcel Hollerbach 2ce15216c7 eo: get back the eo test suite
Summary: I accidently broke the test suite, due to missing rebuilds.

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6421
2018-06-25 11:00:59 -04:00
Marcel Hollerbach ef5c93d173 elm_web: convert the enum fields correctly, as previously done
Summary:
ensure that everything stays in the allowed and previously used ranges.
The enums that are passed here are not equivalent.
Depends on D6383

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6384
2018-06-25 06:57:08 -04:00
Marcel Hollerbach 7305051197 elm_map: convert enums correctly
Summary:
ensure that everything stays in the allowed and previously used ranges.
The enums that are passed here are not equivalent.
Depends on D6382

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6383
2018-06-25 06:56:43 -04:00
Marcel Hollerbach d714c21ecb efl_ui_layout_object: fix warnings
Summary:
ensure that the signal is correctly composed.
For the case that the eina value is carrying a error, then we just error
out.
Depends on D6378

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6379
2018-06-25 06:56:09 -04:00
Bowon Ryu ddeae96421 elm_slider: add null check to avoid seg fault.
Summary: a segmentation fault occurs once the argument is not valid.

Test Plan: N/A

Reviewers: eagleeye, devilhorns, zmike

Reviewed By: eagleeye, zmike

Subscribers: #committers, cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6362
2018-06-25 06:55:57 -04:00
Marcel Hollerbach 4378d6feb9 eo: lower from CRI to ERR
Summary:
unreffing too often is not good. However, its definitly not a critical
error. Most of the wikipedia articles (*) that are speaking about ciritcal or
fatal errors are highlighting that no reasonable recovery can be done.

In our case a recovery is not even needed, due to our pointer safety we
dont need to recover anything since the refcounting safed us from doing
something stupid.

ref T6987.
Depends on D6384

Reviewers: zmike, segfaultxavi, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6987

Differential Revision: https://phab.enlightenment.org/D6385
2018-06-25 06:50:31 -04:00
Hermet Park 28aed68e7f evas canvas: add exceptional case.
Summary:
parent_container should have eina_false as given null parent
in order to avoid call vg_node_changed() for parent.

Reviewers: #committers, devilhorns, zmike

Reviewed By: #committers, zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6387
2018-06-25 06:49:49 -04:00
Jean-Philippe Andre 6f6b365c84 elm_scroll: Avoid calls to non-existing part
In case of Bryce's style, there are no scroll bars.

this avoids errors for non-existent objects

ref T7030

Signed-off-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D6317
2018-06-25 11:30:52 +02:00