summaryrefslogtreecommitdiff
path: root/Source/WebKit/win/WebNotificationCenter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/win/WebNotificationCenter.cpp')
-rw-r--r--Source/WebKit/win/WebNotificationCenter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/WebKit/win/WebNotificationCenter.cpp b/Source/WebKit/win/WebNotificationCenter.cpp
index 23de1c1c9..e02abd593 100644
--- a/Source/WebKit/win/WebNotificationCenter.cpp
+++ b/Source/WebKit/win/WebNotificationCenter.cpp
@@ -28,6 +28,7 @@
#include "WebNotificationCenter.h"
#include "WebNotification.h"
+#include <WebCore/BString.h>
#include <WebCore/COMPtr.h>
#include <utility>
#include <wchar.h>
@@ -38,6 +39,8 @@
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>
+using namespace WebCore;
+
typedef std::pair<COMPtr<IUnknown>, COMPtr<IWebNotificationObserver> > ObjectObserverPair;
typedef Vector<ObjectObserverPair> ObjectObserverList;
typedef ObjectObserverList::iterator ObserverListIterator;
@@ -160,7 +163,7 @@ HRESULT STDMETHODCALLTYPE WebNotificationCenter::addObserver(
HRESULT STDMETHODCALLTYPE WebNotificationCenter::postNotification(
/* [in] */ IWebNotification* notification)
{
- BSTR name;
+ BString name;
HRESULT hr = notification->name(&name);
if (FAILED(hr))
return hr;
@@ -171,7 +174,6 @@ HRESULT STDMETHODCALLTYPE WebNotificationCenter::postNotification(
return hr;
postNotificationInternal(notification, name, obj.get());
- SysFreeString(name);
return hr;
}