Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3733)

Issue 103100044: tests/ibus-engine-switch: Don't try to remove non-existing GSource (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by fujiwara
Modified:
7 years, 11 months ago
Reviewers:
teuf, shawn.p.huang, Peng
CC:
shawn.p.huang_gmail.com, cfergeau_redhat.com
Base URL:
git://github.com/ibus/ibus.git@master
Visibility:
Public.

Description

tests/ibus-engine-switch: Don't try to remove non-existing GSource ibus-engine-switch schedules an idle doing an engine switch, and also schedules a timeout after 1 microsecond which exits the main loop. Both of these callbacks will return FALSE, which detaches the associated GSource from the mainloop and destroys it. As the only way to exit the mainloop is when the timeout callback runs, we should not try to run g_source_remove(timeout_id) as it will already be gone, and this causes a warning. This commit reorders a bit to make the ordering between the idle and timeout more obvious, and it gets rid of the calls to g_source_remove() as they are needed. BUG=https://github.com/ibus/ibus/issues/1868 Committed: 20068d9d0731b580d6d8218b97c482c0558149dd

Patch Set 1 #

Total comments: 2

Patch Set 2 : Updated with http://code.google.com/p/ibus/issues/detail?id=1712#c9 #

Total comments: 5

Patch Set 3 : Updated with message #8. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -7 lines) Patch
M bus/Makefile.am View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M src/tests/ibus-engine-switch.c View 1 2 3 chunks +17 lines, -7 lines 0 comments Download
M src/tests/runtest View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12
fujiwara
10 years ago (2014-06-04 08:00:18 UTC) #1
Peng
https://codereview.appspot.com/103100044/diff/1/src/tests/ibus-engine-switch.c File src/tests/ibus-engine-switch.c (right): https://codereview.appspot.com/103100044/diff/1/src/tests/ibus-engine-switch.c#newcode85 src/tests/ibus-engine-switch.c:85: g_idle_add ((GSourceFunc) change_global_engine_cb, NULL); I think the timeout_cb is ...
10 years ago (2014-06-05 14:22:25 UTC) #2
fujiwara
I noticed you created the updated patch of v4-0001-tests-ibus-engine-switch-Don-t-try-to-remove-non-.patch. Would you create a new code ...
10 years ago (2014-06-06 08:13:33 UTC) #3
fujiwara
https://codereview.appspot.com/103100044/diff/1/src/tests/ibus-engine-switch.c File src/tests/ibus-engine-switch.c (right): https://codereview.appspot.com/103100044/diff/1/src/tests/ibus-engine-switch.c#newcode85 src/tests/ibus-engine-switch.c:85: g_idle_add ((GSourceFunc) change_global_engine_cb, NULL); On 2014/06/05 14:22:25, Peng wrote: ...
10 years ago (2014-06-09 07:09:50 UTC) #4
Peng
https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c File src/tests/ibus-engine-switch.c (right): https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c#newcode62 src/tests/ibus-engine-switch.c:62: ibus_quit (); Should we fail the test if timeout ...
10 years ago (2014-06-09 11:47:13 UTC) #5
teuf
On 2014/06/09 07:09:50, fujiwara wrote: > Updated the patch regarding to > http://code.google.com/p/ibus/issues/detail?id=1712#c9 Thanks for ...
10 years ago (2014-06-10 07:03:06 UTC) #6
teuf
https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c File src/tests/ibus-engine-switch.c (right): https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c#newcode62 src/tests/ibus-engine-switch.c:62: ibus_quit (); On 2014/06/09 11:47:13, Peng wrote: > Should ...
10 years ago (2014-06-10 07:03:13 UTC) #7
Peng
https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c File src/tests/ibus-engine-switch.c (right): https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c#newcode62 src/tests/ibus-engine-switch.c:62: ibus_quit (); On 2014/06/10 07:03:13, teuf wrote: > On ...
10 years ago (2014-06-10 14:32:10 UTC) #8
teuf
https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c File src/tests/ibus-engine-switch.c (left): https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c#oldcode90 src/tests/ibus-engine-switch.c:90: g_assert_cmpint (data.count, ==, G_N_ELEMENTS (engine_names)); The data.count check mentioned ...
10 years ago (2014-06-16 11:21:46 UTC) #9
fujiwara
https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c File src/tests/ibus-engine-switch.c (right): https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c#newcode62 src/tests/ibus-engine-switch.c:62: ibus_quit (); On 2014/06/10 14:32:10, Peng wrote: > On ...
7 years, 11 months ago (2016-07-22 05:12:25 UTC) #10
Peng
On 2016/07/22 05:12:25, fujiwara wrote: > https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c > File src/tests/ibus-engine-switch.c (right): > > https://codereview.appspot.com/103100044/diff/20001/src/tests/ibus-engine-switch.c#newcode62 > ...
7 years, 11 months ago (2016-07-22 11:19:03 UTC) #11
fujiwara
7 years, 11 months ago (2016-07-25 02:42:51 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
20068d9d0731b580d6d8218b97c482c0558149dd (presubmit successful).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b