|
|
Created:
7 years, 2 months ago by atreat Modified:
7 years, 2 months ago CC:
chromium-reviews, cbentzel+watch_chromium.org, do-not-use, yael.aharon1, Lei Zhang Base URL:
https://git.chromium.org/chromium/src.git@master Visibility:
Public. |
DescriptionSimplify the macro for this deprecation. g_type_init was deprecated in glib version 2.36. The previous macros were not working for my clang linux build on ubuntu 13.04.
BUG=none
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227782
Patch Set 1 #
Total comments: 1
Patch Set 2 : Changed the patch to mirror other code #
Total comments: 2
Patch Set 3 : Match browser_main_loop.cc more closely #
Total comments: 1
Patch Set 4 : Update according to reviewer #Patch Set 5 : Try to fix the build on the CQ again #Messages
Total messages: 32 (0 generated)
My linux build was failing to compile with clang and these macros were the problem. Not sure why they weren't working with clang, but this patch simplifies anyway.
Unfortunately I'm not an owner for this directory. Erg or eroman come to mind, but you'll need to check the owners file.
Added eroman after checking the OWNERS file. Thanks.
https://codereview.chromium.org/25385006/diff/1/net/tools/net_watcher/net_wat... File net/tools/net_watcher/net_watcher.cc (right): https://codereview.chromium.org/25385006/diff/1/net/tools/net_watcher/net_wat... net/tools/net_watcher/net_watcher.cc:139: #if (GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION < 36) Shouldn't this be something like: (GLIB_MAJOR_VERSION < 2) || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 36) ? However, it seems better to me to mirror the code in browser_main_loop.cc, which looks like: #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // g_type_init will be deprecated in 2.36. 2.35 is the development // version for 2.36, hence do not call g_type_init starting 2.35. // http://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-t... #if !GLIB_CHECK_VERSION(2, 35, 0) // Glib type system initialization. Needed at least for gconf, // used in net/proxy/proxy_config_service_linux.cc. Most likely // this is superfluous as gtk_init() ought to do this. It's // definitely harmless, so retained as a reminder of this // requirement for gconf. g_type_init(); #endif
I've edited the change so that it conforms to the similar code in browser_main_loop
https://codereview.chromium.org/25385006/diff/7001/net/tools/net_watcher/net_... File net/tools/net_watcher/net_watcher.cc (left): https://codereview.chromium.org/25385006/diff/7001/net/tools/net_watcher/net_... net/tools/net_watcher/net_watcher.cc:135: // Needed so ProxyConfigServiceLinux can use gconf. can you keep the first two lines? https://codereview.chromium.org/25385006/diff/7001/net/tools/net_watcher/net_... File net/tools/net_watcher/net_watcher.cc (right): https://codereview.chromium.org/25385006/diff/7001/net/tools/net_watcher/net_... net/tools/net_watcher/net_watcher.cc:134: #if (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS) can you also change this if def to match BrowserMainLoop?
Fixed to match the code in browser_main_loop more closely.
lgtm
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adam.treat@samsung.com/25385006/12001
Sorry for I got bad news for ya. Compile failed with a clobber build on linux_chromeos_clang. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chro... Your code is likely broken or HEAD is junk. Please ensure your code is not broken then alert the build sheriffs. Look at the try server FAQ for more details.
https://codereview.chromium.org/25385006/diff/12001/net/tools/net_watcher/net... File net/tools/net_watcher/net_watcher.cc (right): https://codereview.chromium.org/25385006/diff/12001/net/tools/net_watcher/net... net/tools/net_watcher/net_watcher.cc:134: #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) looks like you change the guards for the glib-object.h include also
On 2013/10/07 23:24:54, akalin wrote: > https://codereview.chromium.org/25385006/diff/12001/net/tools/net_watcher/net... > File net/tools/net_watcher/net_watcher.cc (right): > > https://codereview.chromium.org/25385006/diff/12001/net/tools/net_watcher/net... > net/tools/net_watcher/net_watcher.cc:134: #if defined(OS_POSIX) && > !defined(OS_MACOSX) && !defined(OS_ANDROID) > looks like you change the guards for the glib-object.h include also So it sounds like the proper thing to do is to go back to the linux+openbsd without chromos guards. Otherwise this is a behavior change... #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) does not equal #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) Agree?
On 2013/10/08 01:20:27, atreat wrote: > On 2013/10/07 23:24:54, akalin wrote: > > > https://codereview.chromium.org/25385006/diff/12001/net/tools/net_watcher/net... > > File net/tools/net_watcher/net_watcher.cc (right): > > > > > https://codereview.chromium.org/25385006/diff/12001/net/tools/net_watcher/net... > > net/tools/net_watcher/net_watcher.cc:134: #if defined(OS_POSIX) && > > !defined(OS_MACOSX) && !defined(OS_ANDROID) > > looks like you change the guards for the glib-object.h include also > > So it sounds like the proper thing to do is to go back to the linux+openbsd > without chromos guards. Otherwise this is a behavior change... > > #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) > > does not equal > > #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) > > Agree? I don't understand your message. Previously, the #if for the glib-object.h were both "(linux || bsd) && !chromeos". I asked you to change it to "posix && !os x && !android" to match browser_main_loop.cc, but you didn't update the one for the include. Yes, it's a behavior change. I think that's fine.
On 2013/10/08 01:24:04, akalin wrote: > I don't understand your message. Previously, the #if for the glib-object.h were > both "(linux || bsd) && !chromeos". I asked you to change it to "posix && !os x > && !android" to match browser_main_loop.cc, but you didn't update the one for > the include. > > Yes, it's a behavior change. I think that's fine. Ok. You know this code. I generally don't like to do behavior changes that don't fit the original issue, but I'll defer to you. Patch updated.
yeah, this is just a tool executable, so it's not a big deal. still lgtm.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adam.treat@samsung.com/25385006/15001
Sorry for I got bad news for ya. Compile failed with a clobber build on linux_chromeos_clang. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chro... Your code is likely broken or HEAD is junk. Please ensure your code is not broken then alert the build sheriffs. Look at the try server FAQ for more details.
+yael FYI r168690 is titled "Avoid calling into glib on ChromeOS" but doesn't say why. Does CrOS not use glib? I forget...
Linux uses ProxyConfigServiceLinux which uses glib. CrOS uses chromeos::ProxyConfigServiceImpl which does not use glib. r168690 allowed net_watcher to build on CrOS again.
On 2013/10/08 21:47:52, pauljensen wrote: > Linux uses ProxyConfigServiceLinux which uses glib. > CrOS uses chromeos::ProxyConfigServiceImpl which does not use glib. > r168690 allowed net_watcher to build on CrOS again. I see. I guess that part should be put back in. How does BrowserMainLoop compile on ChromeOS if it doesn't ifdef that part out?
On 2013/10/08 21:59:05, akalin wrote: > On 2013/10/08 21:47:52, pauljensen wrote: > > Linux uses ProxyConfigServiceLinux which uses glib. > > CrOS uses chromeos::ProxyConfigServiceImpl which does not use glib. > > r168690 allowed net_watcher to build on CrOS again. > > I see. I guess that part should be put back in. > > How does BrowserMainLoop compile on ChromeOS if it doesn't ifdef that part out? atreat@, mind putting in an !defined(OS_CHROMEOS) clause and adding a comment as to why? Sorry this is taking so long!
To more directly answer your question, I don't think CrOS uses glib. glib is from GTK+ which Gnome is based on, and I don't think CrOS uses Gnome. You'll probably need to leave my change in your CL for it to build on CrOS.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adam.treat@samsung.com/25385006/69001
Step "update" is always a major failure. Look at the try server FAQ for more details. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_db...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adam.treat@samsung.com/25385006/69001
Step "update" is always a major failure. Look at the try server FAQ for more details. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_cl...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adam.treat@samsung.com/25385006/69001
Step "update" is always a major failure. Look at the try server FAQ for more details. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_cl...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adam.treat@samsung.com/25385006/69001
Step "update" is always a major failure. Look at the try server FAQ for more details. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_cl...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adam.treat@samsung.com/25385006/69001
Message was sent while issue was closed.
Change committed as 227782 |