WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 97173
[EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
https://bugs.webkit.org/show_bug.cgi?id=97173
Summary
[EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
Eunmi Lee
Reported
2012-09-19 22:57:59 PDT
There are duplicated initializing codes in the ewk_main.cpp and RunLoopEfl.cpp. We have WebContext in the WebKit2, so we can initialize ecore and evas through RunLoopEfl when creating WebContext. We don't have to add ewk_{init, shutdown}() like WebKit1 and let applications call them.
Attachments
Patch
(17.41 KB, patch)
2012-09-26 07:10 PDT
,
Eunmi Lee
no flags
Details
Formatted Diff
Diff
Patch
(17.34 KB, patch)
2012-09-27 07:49 PDT
,
Eunmi Lee
no flags
Details
Formatted Diff
Diff
Patch
(17.29 KB, patch)
2012-09-27 23:38 PDT
,
Eunmi Lee
no flags
Details
Formatted Diff
Diff
Patch
(17.44 KB, patch)
2012-09-28 01:20 PDT
,
Eunmi Lee
no flags
Details
Formatted Diff
Diff
Patch
(5.42 KB, patch)
2012-10-15 04:16 PDT
,
Eunmi Lee
no flags
Details
Formatted Diff
Diff
Patch
(5.44 KB, patch)
2012-10-15 04:58 PDT
,
Eunmi Lee
no flags
Details
Formatted Diff
Diff
Patch
(5.46 KB, patch)
2012-10-22 04:59 PDT
,
Eunmi Lee
no flags
Details
Formatted Diff
Diff
Rebased patch for landing
(5.79 KB, patch)
2013-02-05 03:10 PST
,
Raphael Kubo da Costa (:rakuco)
no flags
Details
Formatted Diff
Diff
Up for review again...
(5.79 KB, patch)
2013-02-05 09:10 PST
,
Raphael Kubo da Costa (:rakuco)
kenneth
: review+
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Eunmi Lee
Comment 1
2012-09-26 06:50:04 PDT
(In reply to
comment #0
)
> There are duplicated initializing codes in the ewk_main.cpp and RunLoopEfl.cpp. > We have WebContext in the WebKit2, so we can initialize ecore and evas through RunLoopEfl when creating WebContext. > We don't have to add ewk_{init, shutdown}() like WebKit1 and let applications call them.
I will make patch to move initialization and shutdown codes of EFL libraries to the ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web-engine process. RunLoopEfl.cpp will not be used to initialize and shutdown the EFL libraries anymore. Additionally, ewk_{init,shutdown} will be called when ewk_context is created and deleted, so application don't have to call ewk_{init,shutdown} and they will be changed to internal function from API.
Eunmi Lee
Comment 2
2012-09-26 07:10:33 PDT
Created
attachment 165794
[details]
Patch
Chris Dumez
Comment 3
2012-09-27 03:31:38 PDT
Comment on
attachment 165794
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=165794&action=review
Looks sane.
> Source/WebCore/ChangeLog:9 > + RunLooEfl.cpp. Initialization and shutdown will be done in the
"RunLoopEfl"
> Source/WebCore/ChangeLog:10 > + ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web-engine
"Web process" ?
Eunmi Lee
Comment 4
2012-09-27 07:43:55 PDT
(In reply to
comment #3
)
> (From update of
attachment 165794
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=165794&action=review
> > Looks sane. > > > Source/WebCore/ChangeLog:9 > > + RunLooEfl.cpp. Initialization and shutdown will be done in the > > "RunLoopEfl" > > > Source/WebCore/ChangeLog:10 > > + ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web-engine > > "Web process" ?
Thanks for review, I will fix them.
Eunmi Lee
Comment 5
2012-09-27 07:49:26 PDT
Created
attachment 165999
[details]
Patch
Gyuyoung Kim
Comment 6
2012-09-27 23:17:07 PDT
Comment on
attachment 165999
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=165999&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_main.cpp:42 > + * @internal
It would be good to add a new line @internal below,
> Source/WebKit2/UIProcess/API/efl/ewk_main.cpp:107 > + * @internal
ditto.
> Source/WebKit2/UIProcess/API/efl/ewk_main.cpp:109 > + * If the reference count reaches 0 WebKit's instance is destroyed.
reaches 0 -> reaches 0, ?
Eunmi Lee
Comment 7
2012-09-27 23:38:13 PDT
Created
attachment 166151
[details]
Patch
Raphael Kubo da Costa (:rakuco)
Comment 8
2012-09-28 00:55:36 PDT
Comment on
attachment 166151
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=166151&action=review
Looks mostly fine, as long as you are sure calling code that does not require a context before creating one does not cause any problems.
> Source/WebKit2/UIProcess/API/efl/ewk_main.cpp:77 > + if (!edje_init()) {
Don't you need to shut Edje down as well now?
Eunmi Lee
Comment 9
2012-09-28 01:05:14 PDT
(In reply to
comment #8
)
> (From update of
attachment 166151
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=166151&action=review
> > Looks mostly fine, as long as you are sure calling code that does not require a context before creating one does not cause any problems. > > > Source/WebKit2/UIProcess/API/efl/ewk_main.cpp:77 > > + if (!edje_init()) { > > Don't you need to shut Edje down as well now?
Thanks for your comment. it is my mistake. edje_shutdown() should be there.
Eunmi Lee
Comment 10
2012-09-28 01:20:31 PDT
Created
attachment 166169
[details]
Patch
WebKit Review Bot
Comment 11
2012-09-28 01:56:40 PDT
Comment on
attachment 166169
[details]
Patch Clearing flags on attachment: 166169 Committed
r129863
: <
http://trac.webkit.org/changeset/129863
>
WebKit Review Bot
Comment 12
2012-09-28 01:56:45 PDT
All reviewed patches have been landed. Closing bug.
Gyuyoung Kim
Comment 13
2012-09-28 03:49:16 PDT
Reverted
r129863
for reason: Broken debug WK2 layout test Committed
r129872
: <
http://trac.webkit.org/changeset/129872
>
Eunmi Lee
Comment 14
2012-10-15 04:16:25 PDT
Created
attachment 168674
[details]
Patch
Eunmi Lee
Comment 15
2012-10-15 04:19:02 PDT
(In reply to
comment #14
)
> Created an attachment (id=168674) [details] > Patch
The ecore_pipe is created in the Source/WTF/wtf/efl/MainThreadEfl.cpp's initializeMainThreadPlatform(), initializeMainThreadPlatform() is called when we use the WKString and the WKString is used in the WebKitTestRunner before creating WebContext. so, I could not remove the ewk_{init, shutdown} API and I've made new patch without that.
Gyuyoung Kim
Comment 16
2012-10-15 04:21:22 PDT
Comment on
attachment 168674
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168674&action=review
> Source/WebKit2/ChangeLog:8 > + Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!).
Missing patch description.
Gyuyoung Kim
Comment 17
2012-10-15 04:27:24 PDT
(In reply to
comment #15
)
> initializeMainThreadPlatform() is called when we use the WKString and the WKString is used in the WebKitTestRunner before creating WebContext.
Isn't this bug ? Or, can't we change this according to your patch ?
Eunmi Lee
Comment 18
2012-10-15 04:46:42 PDT
(In reply to
comment #16
)
> (From update of
attachment 168674
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=168674&action=review
> > > Source/WebKit2/ChangeLog:8 > > + Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). > > Missing patch description.
Oops, I have to add that :)
Eunmi Lee
Comment 19
2012-10-15 04:56:49 PDT
(In reply to
comment #17
)
> (In reply to
comment #15
) > > > initializeMainThreadPlatform() is called when we use the WKString and the WKString is used in the WebKitTestRunner before creating WebContext. > > Isn't this bug ? Or, can't we change this according to your patch ?
I think that is not a bug and it is normal operation of WK. so, I've just done refactoring for init, shutdown functions in this bug.
Eunmi Lee
Comment 20
2012-10-15 04:58:43 PDT
Created
attachment 168681
[details]
Patch
WebKit Review Bot
Comment 21
2012-10-15 13:36:26 PDT
Comment on
attachment 168681
[details]
Patch Clearing flags on attachment: 168681 Committed
r131349
: <
http://trac.webkit.org/changeset/131349
>
WebKit Review Bot
Comment 22
2012-10-15 13:36:32 PDT
All reviewed patches have been landed. Closing bug.
Gyuyoung Kim
Comment 23
2012-10-15 22:17:05 PDT
Reverted
r131349
for reason: Revert Committed
r131412
: <
http://trac.webkit.org/changeset/131412
>
Eunmi Lee
Comment 24
2012-10-22 04:59:58 PDT
Created
attachment 169878
[details]
Patch
Eunmi Lee
Comment 25
2012-10-22 05:01:54 PDT
(In reply to
comment #24
)
> Created an attachment (id=169878) [details] > Patch
I've re-based and checked patch after
Bug 99681
was resolved.
Gyuyoung Kim
Comment 26
2012-10-29 09:09:55 PDT
Comment on
attachment 169878
[details]
Patch Land after checking API test and layout test both on release and debug.
Gyuyoung Kim
Comment 27
2013-01-06 17:16:02 PST
Eunmi, is this patch valid now ? Could you check this ?
Raphael Kubo da Costa (:rakuco)
Comment 28
2013-01-28 07:28:42 PST
Bump. It'd be nice to get this in as soon as possible; right now we're not properly shutting things down in WK2 since RunLoop's destructor is not called when we think it should be (it's a global static).
Raphael Kubo da Costa (:rakuco)
Comment 29
2013-02-05 03:10:07 PST
Created
attachment 186592
[details]
Rebased patch for landing
Raphael Kubo da Costa (:rakuco)
Comment 30
2013-02-05 03:11:02 PST
(In reply to
comment #29
)
> Created an attachment (id=186592) [details] > Rebased patch for landing
EunMi said it was OK for me to rebase the patch, so I've done that and cleaned up the shutdown in ewk_main a little. I'll land and watch the bots after EWS goes green.
Kenneth Rohde Christiansen
Comment 31
2013-02-05 03:11:36 PST
This needs to be signed off by a WK2 owner
Raphael Kubo da Costa (:rakuco)
Comment 32
2013-02-05 03:29:51 PST
Aaaaargh.
Gyuyoung Kim
Comment 33
2013-02-05 03:52:03 PST
Please remove my name in reviewer field. WebKit2 owners don't want that WK2 patch is landed by other reviewer.
Raphael Kubo da Costa (:rakuco)
Comment 34
2013-02-05 09:10:13 PST
Created
attachment 186639
[details]
Up for review again...
Benjamin Poulain
Comment 35
2013-02-06 14:53:04 PST
Comment on
attachment 186639
[details]
Up for review again... View in context:
https://bugs.webkit.org/attachment.cgi?id=186639&action=review
No way to avoid the duplicated code? I sign off on this for WebKit2. Feel free to land it after a proper review of the EFL bits.
> Source/WebKit2/UIProcess/API/efl/ewk_main.cpp:89 > + CRITICAL("could not init edje.");
could -> Could?
Kenneth Rohde Christiansen
Comment 36
2013-02-06 15:36:22 PST
Comment on
attachment 186639
[details]
Up for review again... r=me as Benjamin signed off, but let's fix the spelling before landing.
Raphael Kubo da Costa (:rakuco)
Comment 37
2013-02-07 03:04:02 PST
Committed
r142087
: <
http://trac.webkit.org/changeset/142087
>
Raphael Kubo da Costa (:rakuco)
Comment 38
2013-02-07 04:29:51 PST
(In reply to
comment #35
)
> (From update of
attachment 186639
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=186639&action=review
> > No way to avoid the duplicated code?
Probably, but I'd rather do it separately; I chose to modify the original patch as little as possible here.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug