WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
32661
[GTK] G_OBJECT() cast is not necessary for signals connection and properties access
https://bugs.webkit.org/show_bug.cgi?id=32661
Summary
[GTK] G_OBJECT() cast is not necessary for signals connection and properties ...
Philippe Normand
Reported
2009-12-17 07:06:51 PST
The MediaPlayerPrivateGstreamer.cpp has those casts at various places of the code.
Attachments
proposed patch
(4.04 KB, patch)
2009-12-17 07:36 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
updated patch
(6.30 KB, patch)
2009-12-20 03:29 PST
,
Philippe Normand
xan.lopez
: review+
Details
Formatted Diff
Diff
reverted SENTINEL
(4.95 KB, patch)
2010-01-04 02:13 PST
,
Philippe Normand
eric
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2009-12-17 07:36:30 PST
Created
attachment 45067
[details]
proposed patch [GTK] G_OBJECT() cast is not necessary for signals connection and properties access
https://bugs.webkit.org/show_bug.cgi?id=32661
Removed useless calls to the G_OBJECT() macro. * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::hasVideo): (WebCore::MediaPlayerPrivate::hasAudio): (WebCore::MediaPlayerPrivate::setVolume): (WebCore::MediaPlayerPrivate::createGSTPlayBin):
WebKit Review Bot
Comment 2
2009-12-17 07:38:12 PST
Attachment 45067
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:415: Use 0 instead of NULL. [readability/null] [5] WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:423: Use 0 instead of NULL. [readability/null] [5] WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:432: Use 0 instead of NULL. [readability/null] [5] WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:928: Use 0 instead of NULL. [readability/null] [5] WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:940: Use 0 instead of NULL. [readability/null] [5] Total errors found: 5
Christian Dywan
Comment 3
2009-12-20 02:01:47 PST
Looks obviously correct. While you're at it, it's probably a good opportunity to use 0 since this is WebCore code.
Philippe Normand
Comment 4
2009-12-20 03:29:21 PST
Created
attachment 45266
[details]
updated patch Replaced the NULL occurences with SENTINEL.
WebKit Review Bot
Comment 5
2009-12-20 03:34:04 PST
style-queue ran check-webkit-style on
attachment 45266
[details]
without any errors.
Xan Lopez
Comment 6
2009-12-21 09:44:58 PST
Comment on
attachment 45266
[details]
updated patch r=me
Philippe Normand
Comment 7
2009-12-21 09:59:54 PST
Landed as
r52447
.
Eric Seidel (no email)
Comment 8
2009-12-21 10:17:52 PST
Why is SENTINAL a good thing here? Seems silly to introduce a new NULL. If you want to use NULL here, please answer my mail on webkit-dev:
https://lists.webkit.org/pipermail/webkit-dev/2009-December/011041.html
Philippe Normand
Comment 9
2009-12-21 10:47:17 PST
(In reply to
comment #8
)
> Why is SENTINAL a good thing here? Seems silly to introduce a new NULL. If > you want to use NULL here, please answer my mail on webkit-dev: >
https://lists.webkit.org/pipermail/webkit-dev/2009-December/011041.html
Well yes it is silly ;) But if we use 0 instead of NULL in g_object_{get,set} we get compilation warning: warning: missing sentinel in function call
Eric Seidel (no email)
Comment 10
2009-12-21 10:56:56 PST
Interesting. Seems like we should file a bug to have check-webkit-style not warn in this particular case. It would be great if you could both reply to the thread and file a bug about such. :)
Philippe Normand
Comment 11
2010-01-04 02:09:33 PST
Will send a patch to remove the SENTINEL stuff introduced by this patch. It is not necessary anymore as the style bot won't complain about use of NULL in g_object_get/set calls.
Philippe Normand
Comment 12
2010-01-04 02:13:04 PST
Created
attachment 45787
[details]
reverted SENTINEL
Eric Seidel (no email)
Comment 13
2010-01-04 02:22:28 PST
Comment on
attachment 45787
[details]
reverted SENTINEL OK.
Philippe Normand
Comment 14
2010-01-04 03:06:18 PST
Landed as
r52727
.
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