|
|
Created:
5 years ago by kouhei (in TOK) Modified:
5 years ago CC:
chromium-reviews, devtools-reviews_chromium.org, caseq+blink_chromium.org, jsbell+idb_chromium.org, pfeldman+blink_chromium.org, blink-reviews-css, sof, eae+blinkwatch, lushnikov+blink_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, cmumford, darktears, blink-reviews, dgrogan, sergeyv+blink_chromium.org, kozyatinskiy+blink_chromium.org, blink-reviews-wtf_chromium.org, rwlbuis Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionRemove IsPointerConvertible trait and hacks and just use std::is_base_of.
- SelectorChecker.cpp: Avoid ambiguity comparing a pointer and a reference.
- LayoutTreeBuilderTraversal.h, IDBAny.h: Avoid upcasting incomplete type InsertionPoint, DOMStringList.
- CodeGenerator.py: Force upcast of incomplete type JSONValue.
BUG=None
Committed: https://crrev.com/5c6deb1da6747324ac926f219b97a7fafdca481e
Cr-Commit-Position: refs/heads/master@{#363441}
Patch Set 1 #
Total comments: 12
Patch Set 2 : speculative win compile fix #Patch Set 3 : MSVC workaround #Patch Set 4 : fix #if cond #
Messages
Total messages: 29 (11 generated)
kouhei@chromium.org changed reviewers: + haraken@chromium.org, tzik@chromium.org, yutak@chromium.org
haraken@chromium.org changed reviewers: + esprehn@chromium.org
LGTM, but yutak@ and esprehn@ should confirm this.
I think the change is fine modulo my std::convertible vs std::is_base_of comments, because the functionality of std::convertible is a strict superset of IsPointerConvertible's. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/css/SelectorChecker.cpp (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/css/SelectorChecker.cpp:967: if (context.scope == &element.document()) These changes seem irrelevant. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h:32: #include "core/dom/shadow/InsertionPoint.h" This change seems irrelevant. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py:1149: This change seems irrelevant. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/indexeddb/IDBAny.h (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/indexeddb/IDBAny.h:30: #include "core/dom/DOMStringList.h" This change seems irrelevant. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/w... File third_party/WebKit/Source/wtf/TypeTraits.h (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/w... third_party/WebKit/Source/wtf/TypeTraits.h:182: typename std::enable_if<std::is_base_of<To, From>::value>::type* = nullptr I think you should use std::convertible<From*, To*> instead of std::is_base_of. This should work for both directions (upcast & downcast), right?
mikhail.pozdnyakov@intel.com changed reviewers: + mikhail.pozdnyakov@intel.com
https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/p... File third_party/WebKit/Source/platform/JSONValues.h (left): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/p... third_party/WebKit/Source/platform/JSONValues.h:75: Simple removal of this will lead to a compilation error.. PTAL https://codereview.chromium.org/1479053003/
On 2015/12/03 08:45:36, Mikhail wrote: > https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/p... > File third_party/WebKit/Source/platform/JSONValues.h (left): > > https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/p... > third_party/WebKit/Source/platform/JSONValues.h:75: > Simple removal of this will lead to a compilation error.. > PTAL https://codereview.chromium.org/1479053003/ The CL address this at third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py.
On 2015/12/03 09:19:34, kouhei wrote: > On 2015/12/03 08:45:36, Mikhail wrote: > > > https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/p... > > File third_party/WebKit/Source/platform/JSONValues.h (left): > > > > > https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/p... > > third_party/WebKit/Source/platform/JSONValues.h:75: > > Simple removal of this will lead to a compilation error.. > > PTAL https://codereview.chromium.org/1479053003/ > > The CL address this at > third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py. ah, I missed that. This solution is nicer, thanks
Description was changed from ========== Remove IsPointerConvertible trait and hacks and just use std::is_base_of. BUG=None ========== to ========== Remove IsPointerConvertible trait and hacks and just use std::is_base_of. - SelectorChecker.cpp: Avoid ambiguity comparing a pointer and a reference. - LayoutTreeBuilderTraversal.h, IDBAny.h: Avoid upcasting incomplete type InsertionPoint, DOMStringList. - CodeGenerator.py: Force upcast of incomplete type JSONValue. BUG=None ==========
Thanks for your review! https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/css/SelectorChecker.cpp (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/css/SelectorChecker.cpp:967: if (context.scope == &element.document()) On 2015/12/03 06:51:49, Yuta Kitamura wrote: > These changes seem irrelevant. Updated patch desc. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h:32: #include "core/dom/shadow/InsertionPoint.h" On 2015/12/03 06:51:49, Yuta Kitamura wrote: > This change seems irrelevant. Done. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py:1149: On 2015/12/03 06:51:50, Yuta Kitamura wrote: > This change seems irrelevant. Done. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/indexeddb/IDBAny.h (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/indexeddb/IDBAny.h:30: #include "core/dom/DOMStringList.h" On 2015/12/03 06:51:50, Yuta Kitamura wrote: > This change seems irrelevant. Ditto https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/w... File third_party/WebKit/Source/wtf/TypeTraits.h (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/w... third_party/WebKit/Source/wtf/TypeTraits.h:182: typename std::enable_if<std::is_base_of<To, From>::value>::type* = nullptr On 2015/12/03 06:51:50, Yuta Kitamura wrote: > I think you should use std::convertible<From*, To*> > instead of std::is_base_of. This should work for both directions > (upcast & downcast), right? I don't think we should allow implicit downcasts as they are dangerous. This only allows upcasts.
The CQ bit was checked by kouhei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1493913004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1493913004/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
LGTM modulo MSVC compile failures. https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/w... File third_party/WebKit/Source/wtf/TypeTraits.h (right): https://codereview.chromium.org/1493913004/diff/1/third_party/WebKit/Source/w... third_party/WebKit/Source/wtf/TypeTraits.h:182: typename std::enable_if<std::is_base_of<To, From>::value>::type* = nullptr On 2015/12/04 02:18:58, kouhei wrote: > On 2015/12/03 06:51:50, Yuta Kitamura wrote: > > I think you should use std::convertible<From*, To*> > > instead of std::is_base_of. This should work for both directions > > (upcast & downcast), right? > > I don't think we should allow implicit downcasts as they are dangerous. > This only allows upcasts. Okay.
yutak: PTAL for win workaround added in TypeTraits.h
still LGTM
The CQ bit was checked by kouhei@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org Link to the patchset: https://codereview.chromium.org/1493913004/#ps60001 (title: "fix #if cond")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1493913004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1493913004/60001
Message was sent while issue was closed.
Description was changed from ========== Remove IsPointerConvertible trait and hacks and just use std::is_base_of. - SelectorChecker.cpp: Avoid ambiguity comparing a pointer and a reference. - LayoutTreeBuilderTraversal.h, IDBAny.h: Avoid upcasting incomplete type InsertionPoint, DOMStringList. - CodeGenerator.py: Force upcast of incomplete type JSONValue. BUG=None ========== to ========== Remove IsPointerConvertible trait and hacks and just use std::is_base_of. - SelectorChecker.cpp: Avoid ambiguity comparing a pointer and a reference. - LayoutTreeBuilderTraversal.h, IDBAny.h: Avoid upcasting incomplete type InsertionPoint, DOMStringList. - CodeGenerator.py: Force upcast of incomplete type JSONValue. BUG=None ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Remove IsPointerConvertible trait and hacks and just use std::is_base_of. - SelectorChecker.cpp: Avoid ambiguity comparing a pointer and a reference. - LayoutTreeBuilderTraversal.h, IDBAny.h: Avoid upcasting incomplete type InsertionPoint, DOMStringList. - CodeGenerator.py: Force upcast of incomplete type JSONValue. BUG=None ========== to ========== Remove IsPointerConvertible trait and hacks and just use std::is_base_of. - SelectorChecker.cpp: Avoid ambiguity comparing a pointer and a reference. - LayoutTreeBuilderTraversal.h, IDBAny.h: Avoid upcasting incomplete type InsertionPoint, DOMStringList. - CodeGenerator.py: Force upcast of incomplete type JSONValue. BUG=None Committed: https://crrev.com/5c6deb1da6747324ac926f219b97a7fafdca481e Cr-Commit-Position: refs/heads/master@{#363441} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/5c6deb1da6747324ac926f219b97a7fafdca481e Cr-Commit-Position: refs/heads/master@{#363441}
Message was sent while issue was closed.
This seems to have broken GCC builds- I now get lots of errors like the one copied (truncated) below. (I work on a downstream chromium-based product which uses GCC, but IIRC there are Google chromeos products that use GCC too.) FAILED: g++ -MMD -MF obj/third_party/WebKit/Source/platform/exported/blink_platform.WebFileSystemCallbacks.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D_FILE_OFFSET_BITS=64 -DDISABLE_NACL -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DENABLE_TOPCHROME_MD=1 -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DBLINK_PLATFORM_IMPLEMENTATION=1 -DINSIDE_BLINK -DGL_GLEXT_PROTOTYPES -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DENABLE_INPUT_MULTIPLE_FIELDS_UI=1 -DENABLE_WEB_AUDIO=1 -DWTF_USE_WEBAUDIO_FFMPEG=1 -DWTF_USE_DEFAULT_RENDER_THEME=1 -DLINK_CORE_MODULES_SEPARATELY -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_IGNORE_GL_TEXTURE_TARGET -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DV8_SHARED -DUSING_V8_SHARED -DUSE_SYSTEM_LIBJPEG -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../../third_party/angle/include -Igen/blink -I../../third_party/ffmpeg -I../.. -I../../skia/config -I../../third_party/WebKit/Source -I../../third_party/khronos -I../../gpu -Igen/angle -I../../third_party/WebKit -I../../skia/ext -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/iccjpeg -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/qcms/src -I../../v8/include -I../../third_party/harfbuzz-ng/src -I../../third_party/ffmpeg/chromium/config/Chromium/linux/x64 -I../../third_party/ffmpeg -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -m64 -march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -Wno-c++0x-compat -std=gnu++11 -Wno-narrowing -Wno-literal-suffix -c ../../third_party/WebKit/Source/platform/exported/WebFileSystemCallbacks.cpp -o obj/third_party/WebKit/Source/platform/exported/blink_platform.WebFileSystemCallbacks.o In file included from ../../third_party/WebKit/Source/platform/AsyncFileSystemCallbacks.h:36:0, from ../../third_party/WebKit/Source/platform/exported/WebFileSystemCallbacks.cpp:34: ../../third_party/WebKit/Source/platform/blob/BlobData.h: In constructor 'blink::BlobDataItem::BlobDataItem(WTF::PassRefPtr<blink::BlobDataHandle>, long long int, long long int)': ../../third_party/WebKit/Source/platform/blob/BlobData.h:114:53: error: no matching function for call to 'WTF::RefPtr<blink::BlobDataHandle>::RefPtr(WTF::PassRefPtr<blink::BlobDataHandle>&)' ../../third_party/WebKit/Source/platform/blob/BlobData.h:114:53: note: candidates are: In file included from ../../third_party/WebKit/Source/wtf/PassTraits.h:33:0, from ../../third_party/WebKit/Source/wtf/Deque.h:36, from ../../third_party/WebKit/Source/platform/heap/ThreadingTraits.h:8, from ../../third_party/WebKit/Source/platform/heap/ThreadState.h:37, from ../../third_party/WebKit/Source/platform/heap/GarbageCollected.h:8, from ../../third_party/WebKit/Source/platform/heap/Visitor.h:35, from ../../third_party/WebKit/Source/platform/heap/GCInfo.h:8, from ../../third_party/WebKit/Source/platform/heap/Heap.h:35, from ../../third_party/WebKit/Source/platform/heap/Handle.h:34, from ../../third_party/WebKit/public/platform/WebPrivatePtr.h:37, from ../../third_party/WebKit/public/platform/WebString.h:35, from ../../third_party/WebKit/public/platform/WebFileSystemEntry.h:34, from ../../third_party/WebKit/public/platform/WebFileSystemCallbacks.h:36, from ...
Message was sent while issue was closed.
sigbjornf@opera.com changed reviewers: + sigbjornf@opera.com
Message was sent while issue was closed.
Seems like it would be worthwhile to revert until addressed?
Message was sent while issue was closed.
On 2015/12/09 08:45:06, sof wrote: > Seems like it would be worthwhile to revert until addressed? GCC before 4.9.0 seems to have the same bug. I'll add the cond to the workaround #if shortly. |