Commit cc123596 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[WTR] Memory leaks in InjectedBundleController::initialize()

https://bugs.webkit.org/show_bug.cgi?id=97329

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2012-09-21
Reviewed by Alexey Proskuryakov.

Fix leaks in InjectedBundleController::initialize() by adopting
strings created with WKStringCreateWithUTF8CString().

* TestWebKitAPI/InjectedBundleController.cpp:
(TestWebKitAPI::InjectedBundleController::initialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 11234b0b
2012-09-21 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
[WTR] Memory leaks in InjectedBundleController::initialize()
https://bugs.webkit.org/show_bug.cgi?id=97329
Reviewed by Alexey Proskuryakov.
Fix leaks in InjectedBundleController::initialize() by adopting
strings created with WKStringCreateWithUTF8CString().
* TestWebKitAPI/InjectedBundleController.cpp:
(TestWebKitAPI::InjectedBundleController::initialize):
2012-09-21 Marcelo Lira <marcelo.lira@openbossa.org>
 
[Qt][WK2] Removed duplicated code from EventSenderProxy::keyDown
......
......@@ -70,9 +70,11 @@ void InjectedBundleController::initialize(WKBundleRef bundle, WKTypeRef initiali
assert(WKGetTypeID(initializationUserData) == WKDictionaryGetTypeID());
WKDictionaryRef initializationDictionary = static_cast<WKDictionaryRef>(initializationUserData);
WKStringRef testName = static_cast<WKStringRef>(WKDictionaryGetItemForKey(initializationDictionary, WKStringCreateWithUTF8CString("TestName")));
WKRetainPtr<WKStringRef> testNameKey(AdoptWK, WKStringCreateWithUTF8CString("TestName"));
WKStringRef testName = static_cast<WKStringRef>(WKDictionaryGetItemForKey(initializationDictionary, testNameKey.get()));
WKTypeRef userData = WKDictionaryGetItemForKey(initializationDictionary, WKStringCreateWithUTF8CString("UserData"));
WKRetainPtr<WKStringRef> userDataKey(AdoptWK, WKStringCreateWithUTF8CString("UserData"));
WKTypeRef userData = WKDictionaryGetItemForKey(initializationDictionary, userDataKey.get());
initializeTestNamed(bundle, Util::toSTD(testName), userData);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment