Title: [129598] trunk/Source/WebCore
Revision
129598
Author
par...@webkit.org
Date
2012-09-25 23:55:27 -0700 (Tue, 25 Sep 2012)

Log Message

[WIN] Fix ASSERT in BString after r128988.

* platform/win/BString.cpp:
(WebCore::BString::~BString):
(WebCore::BString::adoptBSTR):
(WebCore::BString::clear): Set pointer to 0 after freeing.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (129597 => 129598)


--- trunk/Source/WebCore/ChangeLog	2012-09-26 06:06:03 UTC (rev 129597)
+++ trunk/Source/WebCore/ChangeLog	2012-09-26 06:55:27 UTC (rev 129598)
@@ -1,3 +1,12 @@
+2012-09-25  Patrick Gansterer  <par...@webkit.org>
+
+        [WIN] Fix ASSERT in BString after r128988.
+
+        * platform/win/BString.cpp:
+        (WebCore::BString::~BString):
+        (WebCore::BString::adoptBSTR):
+        (WebCore::BString::clear): Set pointer to 0 after freeing.
+
 2012-09-25  Yoshifumi Inoue  <yo...@chromium.org>
 
         [Forms] We should disconnect DateTimeEditElement and DateTimeFieldElement on layout()

Modified: trunk/Source/WebCore/platform/win/BString.cpp (129597 => 129598)


--- trunk/Source/WebCore/platform/win/BString.cpp	2012-09-26 06:06:03 UTC (rev 129597)
+++ trunk/Source/WebCore/platform/win/BString.cpp	2012-09-26 06:55:27 UTC (rev 129598)
@@ -106,7 +106,7 @@
 
 BString::~BString()
 {
-    clear();
+    SysFreeString(m_bstr);
 }
 
 BString::BString(const BString& other)
@@ -119,13 +119,14 @@
 
 void BString::adoptBSTR(BSTR bstr)
 {
-    clear();
+    SysFreeString(m_bstr);
     m_bstr = bstr;
 }
 
 void BString::clear()
 {
     SysFreeString(m_bstr);
+    m_bstr = 0;
 }
 
 BString& BString::operator=(const BString& other)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to