Reviewed by Adam.
authorkmccullo <kmccullo@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Oct 2007 01:37:04 +0000 (01:37 +0000)
committerkmccullo <kmccullo@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Oct 2007 01:37:04 +0000 (01:37 +0000)
        - Made JSStringCreateWithBSTR capable of handling null BSTRs.

        * API/JSStringRefCOM.cpp:
        (JSStringCreateWithBSTR):

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

JavaScriptCore/API/JSStringRefCOM.cpp
JavaScriptCore/ChangeLog

index 1b6454ffc775485c0ae3333806230a009640e1f1..b98ee8313df9f680ae53bd56aff5b1aa42418a32 100644 (file)
@@ -34,7 +34,7 @@
 
 JSStringRef JSStringCreateWithBSTR(BSTR string)
 {
-    return JSStringCreateWithCharacters(string, SysStringLen(string));
+    return JSStringCreateWithCharacters(string ? string : L"", string ? SysStringLen(string) : 0);
 }
 
 BSTR JSStringCopyBSTR(const JSStringRef string)
index 85b4c4a690acddbd8d417b1a9eb235fd782e8755..d35d17fb5aaadcda264ec1f0e9c773ed06668967 100644 (file)
@@ -1,3 +1,12 @@
+2007-10-26  Kevin McCullough  <kmccullough@apple.com>
+
+        Reviewed by Adam.
+
+        - Made JSStringCreateWithBSTR capable of handling null BSTRs.
+
+        * API/JSStringRefCOM.cpp:
+        (JSStringCreateWithBSTR):
+
 2007-10-26  Sam Weinig  <sam@webkit.org>
 
         Windows build fix.