[EFL][WK2] EWK2UnitTestBase.ewk_view_page_contents_get API test is sometimes failing
https://bugs.webkit.org/show_bug.cgi?id=108634

Patch by Christophe Dumez <dchris@gmail.com> on 2013-02-07
Reviewed by Alexey Proskuryakov.

Use more robust data validation in EWK2UnitTestBase.ewk_view_page_contents_get
so that the test passes consistently. The issue was that the header before the
data includes the current date. Depending on the date, the data may start at a
different index in the returned string. Instead of hardcoding the data start
index in the test, we now use String::contains().

* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(PageContentsCallback):
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] StringCache::m_stringCache should be HashMap<StringImpl*, Persistent<String>>
https://bugs.webkit.org/show_bug.cgi?id=109123

Reviewed by Adam Barth.

Currently StringCache::m_stringCache is implemented as
HashMap<StringImpl*, v8::String*>. Given that v8::String*
can change when a GC is triggered, it is dangerous to store a raw pointer.
We should use HashMap<StringImpl*, v8::Persistent<v8::String>> instead.

This is a possible fix for an IndexedDB crash (https://bugs.webkit.org/show_bug.cgi?id=105363),
although I'm not sure if this patch fixes the crash. (I couldn't reproduce the crash.)

No tests. This change highly depends on GC behavior and thus it is
difficult to make a reliable test case.

* bindings/v8/V8ValueCache.cpp:
(WebCore::makeExternalString):
* bindings/v8/V8ValueCache.h:
(StringCache):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142154 268f45cc-cd09-0410-ab3c-d52691b4dbfc