Bug 71206 - WTF::StringImpl::create(const char*, unsigned) calls itself
Summary: WTF::StringImpl::create(const char*, unsigned) calls itself
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-30 23:50 PDT by Xianzhu Wang
Modified: 2011-10-31 16:19 PDT (History)
7 users (show)

See Also:


Attachments
patch (1.69 KB, patch)
2011-10-30 23:59 PDT, Xianzhu Wang
rniwa: review+
Details | Formatted Diff | Diff
patch v2 (1.87 KB, patch)
2011-10-31 00:16 PDT, Xianzhu Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xianzhu Wang 2011-10-30 23:50:36 PDT
Now WTF::StringImpl::create(const char*, unsigned) is:
    ALWAYS_INLINE static PassRefPtr<StringImpl> create(const char* s, unsigned length) { return create(s, length); };
which is an infinite recursion.
Comment 1 Ryosuke Niwa 2011-10-30 23:58:05 PDT
I think it meant to be create(reinterpret_cast<const LChar*>(s), length).
Comment 2 Xianzhu Wang 2011-10-30 23:59:30 PDT
Created attachment 113016 [details]
patch
Comment 3 Ryosuke Niwa 2011-10-31 00:00:44 PDT
Comment on attachment 113016 [details]
patch

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

> Source/JavaScriptCore/ChangeLog:5
> +

It'll be nice if you explained what was wrong with the existing code and what you fixed.
Comment 4 Ryosuke Niwa 2011-10-31 00:01:16 PDT
In fact, I suggest you rename the bug title to something like "StringImpl::create(const char*, unsigned) calls itself"
Comment 5 Xianzhu Wang 2011-10-31 00:16:32 PDT
Created attachment 113019 [details]
patch v2
Comment 6 Ryosuke Niwa 2011-10-31 00:20:47 PDT
Comment on attachment 113019 [details]
patch v2

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

> Source/JavaScriptCore/ChangeLog:9
> +        Reviewed by Ryosuke Niwa.

Ugh... this line is supposed to appear ABOVE the description.
Comment 7 Michael Saboff 2011-10-31 09:10:52 PDT
The changes look good to me.
Comment 8 Alexey Proskuryakov 2011-10-31 10:16:01 PDT
Is this dead code? Otherwise, it should be possible to make a regression test.
Comment 9 Ryosuke Niwa 2011-10-31 11:27:13 PDT
(In reply to comment #8)
> Is this dead code? Otherwise, it should be possible to make a regression test.

I believe this change is needed in an effort to support 8-bit string optimization.
Comment 10 WebKit Review Bot 2011-10-31 16:19:09 PDT
Comment on attachment 113019 [details]
patch v2

Clearing flags on attachment: 113019

Committed r98903: <http://trac.webkit.org/changeset/98903>
Comment 11 WebKit Review Bot 2011-10-31 16:19:15 PDT
All reviewed patches have been landed.  Closing bug.