[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:56:47 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 0ecec91a0be933c92fc172dbeea094ca7243d6e8
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 7 08:22:04 2010 +0000

    2010-01-07  Anton Muhin  <antonm at chromium.org>
    
            Reviewed by Adam Barth.
    
            Do not return strings whose handles are in near death state (that means
            they might be GCed) or just empty.
            https://bugs.webkit.org/show_bug.cgi?id=31180
    
            * bindings/v8/V8Binding.cpp:
            (WebCore::v8ExternalString):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52905 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0c9aab7..02f3e1a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-07  Anton Muhin  <antonm at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Do not return strings whose handles are in near death state (that means
+        they might be GCed) or just empty.
+        https://bugs.webkit.org/show_bug.cgi?id=31180
+
+        * bindings/v8/V8Binding.cpp:
+        (WebCore::v8ExternalString):
+
 2010-01-06  MORITA Hajime  <morrita at gmail.com>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/bindings/v8/V8Binding.cpp b/WebCore/bindings/v8/V8Binding.cpp
index d21e1f8..ca7cab3 100644
--- a/WebCore/bindings/v8/V8Binding.cpp
+++ b/WebCore/bindings/v8/V8Binding.cpp
@@ -418,7 +418,11 @@ v8::Local<v8::String> v8ExternalString(const String& string)
     StringCache& stringCache = getStringCache();
     v8::String* cachedV8String = stringCache.get(stringImpl);
     if (cachedV8String)
-        return v8::Local<v8::String>::New(v8::Handle<v8::String>(cachedV8String));
+    {
+        v8::Persistent<v8::String> handle(cachedV8String);
+        if (!handle.IsNearDeath() && !handle.IsEmpty())
+            return v8::Local<v8::String>::New(handle);
+    }
 
     v8::Local<v8::String> newString = makeExternalString(string);
     if (newString.IsEmpty())

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list