WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
96478
[EFL][WK2] Implement missing initializeLogChannel function
https://bugs.webkit.org/show_bug.cgi?id=96478
Summary
[EFL][WK2] Implement missing initializeLogChannel function
KwangYong Choi
Reported
2012-09-12 01:16:22 PDT
Implemented log channel initialization function for EFL platform in WebKit2.
Attachments
Patch
(5.17 KB, patch)
2012-09-12 01:19 PDT
,
KwangYong Choi
no flags
Details
Formatted Diff
Diff
Patch
(5.51 KB, patch)
2012-09-13 01:06 PDT
,
KwangYong Choi
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
KwangYong Choi
Comment 1
2012-09-12 01:19:45 PDT
Created
attachment 163539
[details]
Patch
Raphael Kubo da Costa (:rakuco)
Comment 2
2012-09-12 01:45:34 PDT
Comment on
attachment 163539
[details]
Patch Why not use the implementation we already have in WebCore? Plus the use of glib here is absolutely unnecessary.
KwangYong Choi
Comment 3
2012-09-12 04:11:03 PDT
(In reply to
comment #2
)
> (From update of
attachment 163539
[details]
) > Why not use the implementation we already have in WebCore? Plus the use of glib here is absolutely unnecessary.
The implementation of logging on WebKit is little bit different from WebCore. The routine is called once in case of WebCore implementation, but the routine is called many times in case of WebKit implementation. I think, it's enough to call initializeLogChannel() once like WebCore implementation.
KwangYong Choi
Comment 4
2012-09-12 05:47:21 PDT
I want to change previous routine on GTK and QT first. (
Bug 96500
)
Gyuyoung Kim
Comment 5
2012-09-12 05:47:50 PDT
Comment on
attachment 163539
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=163539&action=review
> Source/WebKit2/Platform/efl/LoggingEfl.cpp:37 > + DEFINE_STATIC_LOCAL(const String, logValue, (g_getenv("WEBKIT_DEBUG")));
If we use getenv instead of g_getenv, can't we remove "#include <glib.h>" ? If possible, EFL port should not have glib dependency.
> Source/WebKit2/Platform/efl/LoggingEfl.cpp:46 > + logValue.split(",", activatedNames);
"," -> ',' ?
Ryuan Choi
Comment 6
2012-09-12 05:51:17 PDT
Comment on
attachment 163539
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=163539&action=review
> Source/WebKit2/Platform/efl/LoggingEfl.cpp:37 > + DEFINE_STATIC_LOCAL(const String, logValue, (g_getenv("WEBKIT_DEBUG")));
I think that it can be moved into below 44 line. (without static)
> Source/WebKit2/Platform/efl/LoggingEfl.cpp:38 > + static Vector<WTFLogChannel*> activatedChannels;
Why this is not static ?
> Source/WebKit2/Platform/efl/LoggingEfl.cpp:45 > + static Vector<String> activatedNames;
Should it be static?
> Source/WebKit2/Platform/efl/LoggingEfl.cpp:46 > + logValue.split(",", activatedNames);
As following
http://trac.webkit.org/wiki/EfficientStrings
, we recommand ASCIILiteral like logValue.split(ASCIILiteral(",", ...)
> Source/WebKit2/Platform/efl/LoggingEfl.cpp:47 > + for (unsigned int i = 0; i < activatedNames.size(); i++) {
I prefered size_t.
Ryuan Choi
Comment 7
2012-09-12 05:54:05 PDT
(In reply to
comment #6
)
> (From update of
attachment 163539
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=163539&action=review
> > > Source/WebKit2/Platform/efl/LoggingEfl.cpp:46 > > + logValue.split(",", activatedNames); >
Oops, I think that gyuyoung is right. first this can be ','. If then, logValue.split(',', activatedNames); is reasonable.
KwangYong Choi
Comment 8
2012-09-13 01:00:20 PDT
Comment on
attachment 163539
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=163539&action=review
I tried to change previous routine in GTK and QT but, it can not be done easily. I just want add this feature to EFL.
>>> Source/WebKit2/Platform/efl/LoggingEfl.cpp:37 >>> + DEFINE_STATIC_LOCAL(const String, logValue, (g_getenv("WEBKIT_DEBUG"))); >> >> If we use getenv instead of g_getenv, can't we remove "#include <glib.h>" ? If possible, EFL port should not have glib dependency. > > I think that it can be moved into below 44 line. (without static)
I will remove glib dependency. I agree with Ryuan. It can be moved into below if block.
>> Source/WebKit2/Platform/efl/LoggingEfl.cpp:38 >> + static Vector<WTFLogChannel*> activatedChannels; > > Why this is not static ?
I think it may be static to avoid recalculation.
>> Source/WebKit2/Platform/efl/LoggingEfl.cpp:45 >> + static Vector<String> activatedNames; > > Should it be static?
No.
>>>> Source/WebKit2/Platform/efl/LoggingEfl.cpp:46 >>>> + logValue.split(",", activatedNames); >>> >>> "," -> ',' ? >> >> As following
http://trac.webkit.org/wiki/EfficientStrings
, we recommand ASCIILiteral like logValue.split(ASCIILiteral(",", ...) > > Oops, I think that gyuyoung is right. first this can be ','. > If then, logValue.split(',', activatedNames); is reasonable.
I will use ',' instead of ","
>> Source/WebKit2/Platform/efl/LoggingEfl.cpp:47 >> + for (unsigned int i = 0; i < activatedNames.size(); i++) { > > I prefered size_t.
I do.
KwangYong Choi
Comment 9
2012-09-13 01:06:54 PDT
Created
attachment 163808
[details]
Patch
Ryuan Choi
Comment 10
2012-09-13 06:01:52 PDT
(In reply to
comment #9
)
> Created an attachment (id=163808) [details] > Patch
Looks good to me.
WebKit Review Bot
Comment 11
2012-09-13 18:15:18 PDT
Comment on
attachment 163808
[details]
Patch Clearing flags on attachment: 163808 Committed
r128537
: <
http://trac.webkit.org/changeset/128537
>
WebKit Review Bot
Comment 12
2012-09-13 18:15:22 PDT
All reviewed patches have been landed. Closing bug.
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