WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
177741
[GLib] NetworkStateNotifier implementation missing
https://bugs.webkit.org/show_bug.cgi?id=177741
Summary
[GLib] NetworkStateNotifier implementation missing
Gustavo Noronha (kov)
Reported
2017-10-02 06:22:59 PDT
[GLib] NetworkStateNotifier implementation missing
Attachments
Patch
(6.03 KB, patch)
2017-10-02 06:26 PDT
,
Gustavo Noronha (kov)
no flags
Details
Formatted Diff
Diff
Patch for landing
(5.72 KB, patch)
2017-10-02 10:02 PDT
,
Gustavo Noronha (kov)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Gustavo Noronha (kov)
Comment 1
2017-10-02 06:26:56 PDT
Created
attachment 322372
[details]
Patch
Gustavo Noronha (kov)
Comment 2
2017-10-02 06:29:55 PDT
I used this to test:
http://html5-demos.appspot.com/static/navigator.onLine.html
Carlos Garcia Campos
Comment 3
2017-10-02 06:59:31 PDT
Comment on
attachment 322372
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=322372&action=review
> Source/WebCore/platform/network/NetworkStateNotifier.cpp:78 > > -#if !PLATFORM(IOS) && !PLATFORM(MAC) && !PLATFORM(WIN) > +#if !PLATFORM(IOS) && !PLATFORM(MAC) && !PLATFORM(WIN) && !PLATFORM(GTK) && !PLATFORM(WPE)
So, can we remove the stubs now then?
> Source/WebCore/platform/network/glib/NetworkStateNotifierGLib.cpp:29 > + GNetworkMonitor* monitor = g_network_monitor_get_default(); > + m_isOnLine = g_network_monitor_get_network_available(monitor);
This can be one line, we don't need the local variable.
> Source/WebCore/platform/network/glib/NetworkStateNotifierGLib.cpp:40 > + GNetworkMonitor* monitor = g_network_monitor_get_default(); > + g_signal_connect(monitor, "network-changed", G_CALLBACK(networkChangedCallback), this);
Ditto. Since we don't really use the monitor in the callback we could use connect swapped and the callbck would only receive the NetworkStateNotifier and we don't need the forward declaration in the header either.
Michael Catanzaro
Comment 4
2017-10-02 07:09:19 PDT
Comment on
attachment 322372
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=322372&action=review
>> Source/WebCore/platform/network/NetworkStateNotifier.cpp:78 >> +#if !PLATFORM(IOS) && !PLATFORM(MAC) && !PLATFORM(WIN) && !PLATFORM(GTK) && !PLATFORM(WPE) > > So, can we remove the stubs now then?
Yeah, looks like it's #if !EVERYTHING now!
Gustavo Noronha (kov)
Comment 5
2017-10-02 10:02:39 PDT
Created
attachment 322383
[details]
Patch for landing
WebKit Commit Bot
Comment 6
2017-10-02 11:08:10 PDT
Comment on
attachment 322383
[details]
Patch for landing Clearing flags on attachment: 322383 Committed
r222723
: <
http://trac.webkit.org/changeset/222723
>
WebKit Commit Bot
Comment 7
2017-10-02 11:08:11 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