summaryrefslogtreecommitdiff
path: root/Tools/TestWebKitAPI/InjectedBundleController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/TestWebKitAPI/InjectedBundleController.cpp')
-rw-r--r--Tools/TestWebKitAPI/InjectedBundleController.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Tools/TestWebKitAPI/InjectedBundleController.cpp b/Tools/TestWebKitAPI/InjectedBundleController.cpp
index 537104fb9..fb78013ee 100644
--- a/Tools/TestWebKitAPI/InjectedBundleController.cpp
+++ b/Tools/TestWebKitAPI/InjectedBundleController.cpp
@@ -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);
}