Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Issue 197873014: Revert of Implement ScopedFD in terms of ScopedGeneric. (Closed)

Created:
6 years, 9 months ago by Nico
Modified:
6 years, 9 months ago
Reviewers:
brettw, agl, viettrungluu
CC:
chromium-reviews, nkostylev+watch_chromium.org, gavinp+memory_chromium.org, stevenjb+watch_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, yfriedman+watch_chromium.org, chromium-apps-reviews_chromium.org, erikwright+watch_chromium.org, fischman+watch_chromium.org, craigdh+watch_chromium.org, feature-media-reviews_chromium.org, bulach+watch_chromium.org, oshima+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, agl, tfarina, mcasas+watch_chromium.org, robertshield, davemoore+watch_chromium.org, stgao, wjia+watch_chromium.org, jln+watch_chromium.org
Visibility:
Public.

Description

Revert of Implement ScopedFD in terms of ScopedGeneric. (https://codereview.chromium.org/191673003/) Reason for revert: Doesn't build on android: FAILED: /mnt/data/b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/memory/base.discardable_memory_allocator_android.o.d -DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_CONFIGURATION_POLICY -DENABLE_NEW_GAMEPAD_API=1 -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DENABLE_AUTOFILL_DIALOG=1 -DCLD_VERSION=1 -DENABLE_PRINTING=1 -DENABLE_MANAGED_USERS=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DBASE_IMPLEMENTATION -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Igen/base -I../../third_party/android_tools/ndk/sources/android/cpufeatures -I../.. -fstack-protector --param=ssp-buffer-size=4 -Werror -fno-exceptions -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-reserved-user-defined-literal -Wno-deprecated-register -Xclang -load -Xclang /mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-url-directory -fcolor-diagnostics -Wexit-time-destructors -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -no-integrated-as -B/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin -ffunction-sections -funwind-tables -g -fstack-protector -fno-short-enums -Wa,--noexecstack -D__compiler_offsetof=__builtin_offsetof -Dnan=__builtin_nan -target arm-linux-androideabi -mllvm -arm-enable-ehabi --sysroot=/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-14/arch-arm -I/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -Os -g -fomit-frame-pointer -fdata-sections -ffunction-sections -funwind-tables -g0 -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11 -Wno-implicit-exception-spec-mismatch -Wno-abi -c ../../base/memory/discardable_memory_allocator_android.cc -o obj/base/memory/base.discardable_memory_allocator_android.o ../../base/memory/discardable_memory_allocator_android.cc:84:25:error: no matching function for call to 'mmap' void* const address = mmap( ^~~~ /mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-14/arch-arm/usr/include/sys/mman.h:47:15: note: candidate function not viable: no known conversion from 'base::ScopedFD' (aka 'ScopedGeneric<int, internal::ScopedFDCloseTraits>') to 'int' for 5th argument extern void* mmap(void *, size_t, int, int, int, off_t); ^ 1 error generated. Original issue's description: > Implement ScopedFD in terms of ScopedGeneric. > > Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. > > I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. > > I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). > > BUG= > R=agl@chromium.org, viettrungluu@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001 TBR=viettrungluu@chromium.org,agl@chromium.org,brettw@chromium.org NOTREECHECKS=true NOTRY=true BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257005

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+288 lines, -335 lines) Patch
M base/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
M base/base.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M base/debug/proc_maps_linux.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M base/file_util.h View 1 chunk +26 lines, -0 lines 0 comments Download
M base/file_util_posix.cc View 3 chunks +8 lines, -8 lines 0 comments Download
M base/file_util_unittest.cc View 3 chunks +4 lines, -5 lines 0 comments Download
D base/files/scoped_file.h View 1 chunk +0 lines, -47 lines 0 comments Download
D base/files/scoped_file.cc View 1 chunk +0 lines, -35 lines 0 comments Download
M base/memory/discardable_memory_allocator_android.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M base/memory/shared_memory.h View 2 chunks +1 line, -2 lines 0 comments Download
M base/memory/shared_memory_posix.cc View 8 chunks +14 lines, -10 lines 0 comments Download
M base/posix/unix_domain_socket_linux_unittest.cc View 3 chunks +3 lines, -4 lines 0 comments Download
M base/process/kill_mac.cc View 3 chunks +6 lines, -5 lines 0 comments Download
M base/process/kill_posix.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M base/process/launch_posix.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M base/test/launcher/test_launcher.cc View 3 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/system/automatic_reboot_manager.cc View 3 chunks +11 lines, -12 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc View 3 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/mac/relauncher.cc View 7 chunks +13 lines, -11 lines 0 comments Download
M chrome/browser/process_singleton_mac_unittest.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/test/automation/proxy_launcher.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/test/chromedriver/chrome_launcher.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/utility/importer/firefox_importer_unittest_utils_mac.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M components/nacl.gyp View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/child_process_launcher.cc View 3 chunks +2 lines, -3 lines 0 comments Download
M content/browser/zygote_host/zygote_host_impl_linux.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M content/child/npapi/np_channel_base.cc View 3 chunks +3 lines, -4 lines 0 comments Download
M content/common/sandbox_linux/sandbox_linux.cc View 4 chunks +15 lines, -11 lines 0 comments Download
M content/common/sandbox_mac.mm View 2 chunks +4 lines, -4 lines 0 comments Download
M content/common/sandbox_mac_system_access_unittest.mm View 3 chunks +7 lines, -6 lines 0 comments Download
M ipc/ipc_channel_factory.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M ipc/unix_domain_socket_util.cc View 7 chunks +25 lines, -24 lines 0 comments Download
M media/video/capture/linux/video_capture_device_linux.h View 2 chunks +2 lines, -2 lines 0 comments Download
M media/video/capture/linux/video_capture_device_linux.cc View 21 chunks +40 lines, -37 lines 0 comments Download
M net/test/spawned_test_server/local_test_server.h View 2 chunks +2 lines, -2 lines 0 comments Download
M net/test/spawned_test_server/local_test_server_posix.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M sandbox/linux/services/broker_process_unittest.cc View 4 chunks +5 lines, -4 lines 0 comments Download
M sandbox/linux/services/credentials_unittest.cc View 4 chunks +5 lines, -4 lines 0 comments Download
M sandbox/linux/services/scoped_process_unittest.cc View 3 chunks +5 lines, -6 lines 0 comments Download
M sandbox/linux/services/yama.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M tools/android/memdump/memdump.cc View 5 chunks +13 lines, -10 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Nico
Created Revert of Implement ScopedFD in terms of ScopedGeneric.
6 years, 9 months ago (2014-03-14 05:33:23 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/197873014/1
6 years, 9 months ago (2014-03-14 05:35:42 UTC) #2
commit-bot: I haz the power
6 years, 9 months ago (2014-03-14 05:37:12 UTC) #3
Message was sent while issue was closed.
Change committed as 257005

Powered by Google App Engine
This is Rietveld 408576698