Use Traits in V8StringResource to avoid code duplication
Use Traits in V8StringResource to avoid code duplication

Use Traits in V8StringResource to avoid code duplication in
StringTraits::fromV8String() for 1-byte / 2-bytes v8::String.

This also gets rid of template specializations for the oneByte boolean
argument which makes the code a bit clearer as fromV8String<false> /
fromV8String<true> was not very readable.

There is no visible impact on performance according to Dromaeo DOM Core:
http://dromaeo.com/?id=219949,219955

The binary size is slightly smaller (184 bytes), likely because the compiler is
able to simplify the code further as fromV8String() is now implicitly inlined
but it wasn't before due to template specialization.

R=haraken@chromium.org, adamk@chromium.org

Review URL: https://codereview.chromium.org/238533002

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@171677 bbb929c8-8fbe-4397-9dbb-9b2b20218538

modulexcite/blink,hgl888/blink-crosswalk-efl,modulexcite/blink,ondra-novak/blink,kurli/blink-crosswalk,nwjs/blink,PeterWangIntel/blink-crosswalk,ondra-novak/blink,Bysmyyr/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,jtg-gg/blink,hgl888/blink-crosswalk-efl,ondra-novak/blink,PeterWangIntel/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,jtg-gg/blink,hgl888/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,jtg-gg/blink,kurli/blink-crosswalk,nwjs/blink,smishenk/blink-crosswalk,hgl888/blink-crosswalk-efl,jtg-gg/blink,hgl888/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,jtg-gg/blink,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,hgl888/blink-crosswalk-efl,modulexcite/blink,Bysmyyr/blink-crosswalk,jtg-gg/blink,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,ondra-novak/blink,smishenk/blink-crosswalk,jtg-gg/blink,nwjs/blink,modulexcite/blink,modulexcite/blink,nwjs/blink,crosswalk-project/blink-crosswalk-efl,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,modulexcite/blink,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,ondra-novak/blink,jtg-gg/blink,nwjs/blink,XiaosongWei/blink-crosswalk,nwjs/blink,hgl888/blink-crosswalk-efl,jtg-gg/blink,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,hgl888/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,ondra-novak/blink,crosswalk-project/blink-crosswalk-efl,nwjs/blink,XiaosongWei/blink-crosswalk,jtg-gg/blink,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,kurli/blink-crosswalk,nwjs/blink,nwjs/blink,XiaosongWei/blink-crosswalk,modulexcite/blink,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,kurli/blink-crosswalk,Bysmyyr/blink-crosswalk,modulexcite/blink,PeterWangIntel/blink-crosswalk,modulexcite/blink,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,PeterWangIntel/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,modulexcite/blink,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk