<rdar://problem/5616098> The BSTR returned by WebHistoryItem::alternateTitle
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2007 23:32:36 +0000 (23:32 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2007 23:32:36 +0000 (23:32 +0000)
        was not allocated correctly.

        Reviewed by Anders.

        * WebHistoryItem.cpp:
        (WebHistoryItem::setAlternateTitle):
        (WebHistoryItem::alternateTitle):
        * WebHistoryItem.h:

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

WebKit/win/ChangeLog
WebKit/win/WebHistoryItem.cpp
WebKit/win/WebHistoryItem.h

index 355cce789f7f97522ec24203777ba2214f32de8b..7db8d32e9e996aa882db283abf3c695a8903ea1a 100644 (file)
@@ -1,3 +1,15 @@
+2007-11-27  Ada Chan  <adachan@apple.com>
+
+        <rdar://problem/5616098> The BSTR returned by WebHistoryItem::alternateTitle
+        was not allocated correctly.
+
+        Reviewed by Anders.
+
+        * WebHistoryItem.cpp:
+        (WebHistoryItem::setAlternateTitle):
+        (WebHistoryItem::alternateTitle):
+        * WebHistoryItem.h:
+
 2007-11-27  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Adam.
index b56988f67e66f0de09e21d3d1f0fd5b67e71d446..a4993bfe9dc7be2f20b44ddb31e7d849e9abb044 100644 (file)
@@ -422,7 +422,7 @@ HRESULT STDMETHODCALLTYPE WebHistoryItem::lastVisitedTimeInterval(
 HRESULT STDMETHODCALLTYPE WebHistoryItem::setAlternateTitle( 
     /* [in] */ BSTR title)
 {
-    m_alternateTitle = title;
+    m_alternateTitle = String(title, SysStringLen(title));
     return S_OK;
 }
 
@@ -434,7 +434,7 @@ HRESULT STDMETHODCALLTYPE WebHistoryItem::alternateTitle(
         return E_POINTER;
     }
 
-    *title = m_alternateTitle;
+    *title = BString(m_alternateTitle).release();
     return S_OK;
 }
 
index 7795e83708108e013fd7aebada047fe7035f7ff5..659f5b2f167b506a6306ecf9da090c11a0a44cb3 100644 (file)
@@ -31,7 +31,7 @@
 #include "IWebIconDatabase.h"
 
 #include <CoreFoundation/CoreFoundation.h>
-#include <WebCore/BString.h>
+#include <WebCore/PlatformString.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 
@@ -106,7 +106,7 @@ protected:
     ULONG m_refCount;
 
     RefPtr<WebCore::HistoryItem> m_historyItem;
-    WebCore::BString m_alternateTitle;
+    WebCore::String m_alternateTitle;
 };
 
 #endif