Bug 137356

Summary: Simplify StringTypeAdapter templates
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch kling: review+

Description Anders Carlsson 2014-10-02 13:36:50 PDT
Simplify StringTypeAdapter templates
Comment 1 Anders Carlsson 2014-10-02 13:38:49 PDT
Created attachment 239134 [details]
Patch
Comment 2 Tim Horton 2014-10-02 14:00:29 PDT
Comment on attachment 239134 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=239134&action=review

> Source/WTF/wtf/text/StringConcatenate.h:35
> +#ifndef StringView_h

Wut.

> Source/WTF/wtf/text/StringView.h:177
> +#include <wtf/text/WTFString.h>

Why is this down here?

> Source/WTF/wtf/text/StringView.h:179
> +namespace WTF {

Why a second namespace WTF?
Comment 3 Anders Carlsson 2014-10-02 14:08:14 PDT
(In reply to comment #2)
> (From update of attachment 239134 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=239134&action=review
> 
> > Source/WTF/wtf/text/StringConcatenate.h:35
> > +#ifndef StringView_h
> 
> Wut.

It's an external header guard.

> 
> > Source/WTF/wtf/text/StringView.h:177
> > +#include <wtf/text/WTFString.h>
> 
> Why is this down here?

It's to avoid a cyclical include chain.

> 
> > Source/WTF/wtf/text/StringView.h:179
> > +namespace WTF {
> 
> Why a second namespace WTF?

We don't want to #include when inside the namespace.
Comment 4 Anders Carlsson 2014-10-02 14:08:45 PDT
Created attachment 239136 [details]
Patch
Comment 5 Anders Carlsson 2014-10-02 14:54:26 PDT
Created attachment 239143 [details]
Patch
Comment 6 Anders Carlsson 2014-10-02 15:48:49 PDT
Committed r174234: <http://trac.webkit.org/changeset/174234>