RESOLVED FIXED 95271
Replace JSC::UString by WTF::String
https://bugs.webkit.org/show_bug.cgi?id=95271
Summary Replace JSC::UString by WTF::String
Benjamin Poulain
Reported Wednesday, August 29, 2012 1:54:06 AM UTC
JSC is gonna be sweeeeeet.
Attachments
Patch (506.90 KB, patch)
2012-08-28 18:20 PDT, Benjamin Poulain
no flags
Patch (540.95 KB, patch)
2012-08-29 21:30 PDT, Benjamin Poulain
no flags
Patch for GTK build fix (995 bytes, patch)
2012-08-30 00:32 PDT, Zan Dobersek
no flags
Patch (541.64 KB, patch)
2012-08-30 01:07 PDT, Benjamin Poulain
no flags
Patch (541.64 KB, patch)
2012-08-30 09:29 PDT, Benjamin Poulain
ggaren: review+
gyuyoung.kim: commit-queue-
Benjamin Poulain
Comment 1 Wednesday, August 29, 2012 2:20:17 AM UTC
Benjamin Poulain
Comment 2 Wednesday, August 29, 2012 2:21:43 AM UTC
The EFL EWS is gonna fail, there is nothing I can do about it with the patch. The bot does not regenerate the bindings and it fails to build because the old generated files reference UString.
Geoffrey Garen
Comment 3 Wednesday, August 29, 2012 3:18:03 AM UTC
Please test SunSpider before landing. It's heavy in the string library functions.
Benjamin Poulain
Comment 4 Wednesday, August 29, 2012 3:22:48 AM UTC
Thanks for the review, I was not expecting one tonight! :) (In reply to comment #3) > Please test SunSpider before landing. It's heavy in the string library functions. Will do.
Gyuyoung Kim
Comment 5 Wednesday, August 29, 2012 3:39:26 AM UTC
Gyuyoung Kim
Comment 6 Wednesday, August 29, 2012 7:27:01 AM UTC
Comment on attachment 161108 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161108&action=review > Source/WebCore/bindings/js/JSIntentConstructor.cpp:68 > + const String type(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).isEmpty() ? String() : MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toWTFString(exec))); It looks unneeded ")" is added at the end of line. When I remove ")", EFL build is fine.
Benjamin Poulain
Comment 7 Wednesday, August 29, 2012 7:56:52 AM UTC
> > Source/WebCore/bindings/js/JSIntentConstructor.cpp:68 > > + const String type(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).isEmpty() ? String() : MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toWTFString(exec))); > > It looks unneeded ")" is added at the end of line. When I remove ")", EFL build is fine. Thanks for looking! I'll make an update tomorrow.
Benjamin Poulain
Comment 8 Thursday, August 30, 2012 5:30:09 AM UTC
Benjamin Poulain
Comment 9 Thursday, August 30, 2012 5:36:19 AM UTC
Changes since last patch: -Added getCharactersWithUpconvert<>() because the behavior of UString::getCharacters<>() was slightly different and we need the other behavior for StringPrototype. -Added back WebCore::jsString, renamed it to jsStringWithCache so it is easier to differentiate when to use which function. I haven't measured any difference on Sunspider with this version. Gavin gave me some tricks to perform more perf testing, I'll try that before landing. The WebCore binary got even smaller with the changes and I have no clue why. The EFL bot is covered, the GTK bot will be.
Simon Hausmann
Comment 10 Thursday, August 30, 2012 6:31:49 AM UTC
Totally awesome stuff :) (In reply to comment #9) > The WebCore binary got even smaller with the changes and I have no clue why. Perhaps it is the reduced number of entries in the PLT that contributes to the reduction in size.
Gyuyoung Kim
Comment 11 Thursday, August 30, 2012 6:57:56 AM UTC
kov's GTK+ EWS bot
Comment 12 Thursday, August 30, 2012 6:58:34 AM UTC
Gyuyoung Kim
Comment 13 Thursday, August 30, 2012 7:03:41 AM UTC
Zan Dobersek
Comment 14 Thursday, August 30, 2012 8:16:27 AM UTC
I'm looking into the GTK build failures and will hopefully produce a fix soon.
Zan Dobersek
Comment 15 Thursday, August 30, 2012 8:32:37 AM UTC
Created attachment 161411 [details] Patch for GTK build fix The symbols.filter file just needs an update for the jsStringWithCacheSlowCase symbol. With that the build should be fixed.
Benjamin Poulain
Comment 16 Thursday, August 30, 2012 9:01:18 AM UTC
> The symbols.filter file just needs an update for the jsStringWithCacheSlowCase symbol. With that the build should be fixed. Aw snap. Thanks for the patch. I'll make an update.
Benjamin Poulain
Comment 17 Thursday, August 30, 2012 9:07:42 AM UTC
Benjamin Poulain
Comment 18 Thursday, August 30, 2012 9:15:57 AM UTC
> Totally awesome stuff :) Glad you like it :) > Perhaps it is the reduced number of entries in the PLT that contributes to the reduction in size. Maybe. I don't think I removed symbols between the two patches but I could have forgot.
Gyuyoung Kim
Comment 19 Thursday, August 30, 2012 10:30:36 AM UTC
Gyuyoung Kim
Comment 20 Thursday, August 30, 2012 10:40:37 AM UTC
Benjamin Poulain
Comment 21 Thursday, August 30, 2012 5:29:43 PM UTC
Gyuyoung Kim
Comment 22 Thursday, August 30, 2012 7:03:39 PM UTC
Gyuyoung Kim
Comment 23 Thursday, August 30, 2012 7:10:29 PM UTC
Geoffrey Garen
Comment 24 Thursday, August 30, 2012 8:47:51 PM UTC
Comment on attachment 161492 [details] Patch r=me
Thiago Marcos P. Santos
Comment 25 Thursday, August 30, 2012 8:52:27 PM UTC
Benjamin, May I have 10 minutes just to try the patch locally here on EFL?
Thiago Marcos P. Santos
Comment 26 Thursday, August 30, 2012 9:16:03 PM UTC
(In reply to comment #25) > Benjamin, > > May I have 10 minutes just to try the patch locally here on EFL? It is indeed failing, I tried a clean build. Need a couple more minutes to fix.
Thiago Marcos P. Santos
Comment 27 Thursday, August 30, 2012 9:36:08 PM UTC
This patch is good to go on EFL after the change bellow (but looks unrelated to the error reported by the bot). Please apply the change and ignore any further EFL EWS errors on this patch: diff --git a/Source/WebCore/bindings/js/Dictionary.cpp b/Source/WebCore/bindings/js/Dictionary.cpp index a16b5b9..e126b95 100644 --- a/Source/WebCore/bindings/js/Dictionary.cpp +++ b/Source/WebCore/bindings/js/Dictionary.cpp @@ -90,7 +90,7 @@ bool Dictionary::getOwnPropertyNames(WTF::Vector<String>& names) const PropertyNameArray propertyNames(exec); JSObject::getOwnPropertyNames(object, exec, propertyNames, ExcludeDontEnumProperties); for (PropertyNameArray::const_iterator it = propertyNames.begin(); it != propertyNames.end(); it++) { - String stringKey = ustringToString(it->ustring()); + const String& stringKey = it->ustring(); if (!stringKey.isEmpty()) names.append(stringKey); }
Benjamin Poulain
Comment 28 Thursday, August 30, 2012 10:23:37 PM UTC
Note You need to log in before you can comment on or make changes to this bug.