Bug 166676

Summary: Limit thread name appropriately
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: Web Template FrameworkAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cgarcia, cmarcelo, commit-queue, dbates, mcatanzaro, wenson_hsieh
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 166663    
Bug Blocks:    
Attachments:
Description Flags
Patch sam: review+

Yusuke Suzuki
Reported 2017-01-04 00:29:35 PST
...
Attachments
Patch (8.92 KB, patch)
2017-01-04 01:41 PST, Yusuke Suzuki
sam: review+
Yusuke Suzuki
Comment 1 2017-01-04 01:41:57 PST
Sam Weinig
Comment 2 2017-01-04 09:48:11 PST
Comment on attachment 298003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298003&action=review > Source/WTF/wtf/Threading.h:80 > +const char* retrieveThreadName(const char* threadName); I think a name like normalizeThreadName() or sanatizeThreadName() would be better. > Source/WTF/wtf/text/StringView.h:27 > #ifndef StringView_h > #define StringView_h Could #pragma once this while you are here. > Source/WTF/wtf/text/StringView.h:119 > + StringView left(unsigned len) const { return substring(0, len); } > + StringView right(unsigned len) const { return substring(length() - len, len); } This could use an API test. > Source/WTF/wtf/text/StringView.h:127 > + size_t reverseFind(UChar, unsigned index = UINT_MAX) const; Same here.
Yusuke Suzuki
Comment 3 2017-01-04 17:55:27 PST
Comment on attachment 298003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298003&action=review Thanks :) >> Source/WTF/wtf/Threading.h:80 >> +const char* retrieveThreadName(const char* threadName); > > I think a name like normalizeThreadName() or sanatizeThreadName() would be better. Sounds nice. Changed to use normalizeThreadName. >> Source/WTF/wtf/text/StringView.h:27 >> #define StringView_h > > Could #pragma once this while you are here. Yeah, fixed. >> Source/WTF/wtf/text/StringView.h:119 >> + StringView right(unsigned len) const { return substring(length() - len, len); } > > This could use an API test. Yup, added. >> Source/WTF/wtf/text/StringView.h:127 >> + size_t reverseFind(UChar, unsigned index = UINT_MAX) const; > > Same here. Added.
Yusuke Suzuki
Comment 4 2017-01-04 18:54:03 PST
Wenson Hsieh
Comment 5 2017-01-04 19:57:22 PST
I think this is causing some build failures on the bots: /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:51:7: error: redefinition of 'StringView' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:188:13: error: redefinition of 'operator==' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:189:13: error: redefinition of 'operator==' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:190:13: error: redefinition of 'operator==' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:191:13: error: redefinition of 'operator==' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:192:13: error: redefinition of 'operator==' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:194:13: error: redefinition of 'operator!=' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:195:13: error: redefinition of 'operator!=' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:196:13: error: redefinition of 'operator!=' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:197:13: error: redefinition of 'operator!=' /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/include/wtf/text/StringView.h:198:13: error: redefinition of 'operator!=' /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h:207:20: error: redefinition of 'StringView' /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h:213:20: error: redefinition of '~StringView' /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h:218:20: error: redefinition of 'StringView' /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h:231:20: error: redefinition of 'StringView' /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h:241:32: error: redefinition of 'operator=' /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h:257:32: error: redefinition of 'operator=' /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h:271:25: error: redefinition of 'initialize' /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h:278:25: error: redefinition of 'initialize'
Yusuke Suzuki
Comment 6 2017-01-04 20:05:43 PST
Yusuke Suzuki
Comment 7 2017-01-04 20:08:43 PST
(In reply to comment #5) > I think this is causing some build failures on the bots: > > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:51:7: error: redefinition of 'StringView' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:188:13: error: redefinition of 'operator==' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:189:13: error: redefinition of 'operator==' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:190:13: error: redefinition of 'operator==' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:191:13: error: redefinition of 'operator==' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:192:13: error: redefinition of 'operator==' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:194:13: error: redefinition of 'operator!=' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:195:13: error: redefinition of 'operator!=' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:196:13: error: redefinition of 'operator!=' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:197:13: error: redefinition of 'operator!=' > /Volumes/Data/slave/elcapitan-debug/build/WebKitBuild/Debug/usr/local/ > include/wtf/text/StringView.h:198:13: error: redefinition of 'operator!=' > /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h: > 207:20: error: redefinition of 'StringView' > /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h: > 213:20: error: redefinition of '~StringView' > /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h: > 218:20: error: redefinition of 'StringView' > /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h: > 231:20: error: redefinition of 'StringView' > /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h: > 241:32: error: redefinition of 'operator=' > /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h: > 257:32: error: redefinition of 'operator=' > /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h: > 271:25: error: redefinition of 'initialize' > /Volumes/Data/slave/elcapitan-debug/build/Source/WTF/wtf/text/StringView.h: > 278:25: error: redefinition of 'initialize' Thanks! I've just landed the build fix :)
Yusuke Suzuki
Comment 8 2017-01-04 20:44:13 PST
Note You need to log in before you can comment on or make changes to this bug.