Windows DRT build fix.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Sep 2009 20:32:19 +0000 (20:32 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Sep 2009 20:32:19 +0000 (20:32 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@48365 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/LayoutTestController.cpp
WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp

index a8f3303..9ca6861 100644 (file)
@@ -1,5 +1,16 @@
 2009-09-14  Brady Eidson  <beidson@apple.com>
 
+        Windows build fix.
+
+        * DumpRenderTree/LayoutTestController.cpp:
+        (setAuthenticationPasswordCallback):
+        (setAuthenticationUsernameCallback):
+        
+        * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+        (ResourceLoadDelegate::didReceiveAuthenticationChallenge):
+
+2009-09-14  Brady Eidson  <beidson@apple.com>
+
         Reviewed by Alexey Proskuryakov.
 
         Safari 4 cannot be used to update firmware on Linksys routers.
index 6e98208..409d5ab 100644 (file)
@@ -584,11 +584,12 @@ static JSValueRef setAuthenticationPasswordCallback(JSContextRef context, JSObje
     ASSERT(!*exception);
 
     size_t maxLength = JSStringGetMaximumUTF8CStringSize(password.get());
-    char passwordBuffer[maxLength + 1];
+    char* passwordBuffer = new char[maxLength + 1];
     JSStringGetUTF8CString(password.get(), passwordBuffer, maxLength + 1);
     
     LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     controller->setAuthenticationPassword(passwordBuffer);
+    delete[] passwordBuffer;
 
     return JSValueMakeUndefined(context);
 }
@@ -603,11 +604,12 @@ static JSValueRef setAuthenticationUsernameCallback(JSContextRef context, JSObje
     ASSERT(!*exception);
 
     size_t maxLength = JSStringGetMaximumUTF8CStringSize(username.get());
-    char usernameBuffer[maxLength + 1];
+    char* usernameBuffer = new char[maxLength + 1];
     JSStringGetUTF8CString(username.get(), usernameBuffer, maxLength + 1);
     
     LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     controller->setAuthenticationUsername(usernameBuffer);
+    delete[] usernameBuffer;
 
     return JSValueMakeUndefined(context);
 }
index 0cd61da..1d42aeb 100644 (file)
@@ -261,7 +261,7 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didReceiveAuthenticationChalleng
     /* [in] */ IWebDataSource *dataSource)
 {
     if (!gLayoutTestController->handlesAuthenticationChallenges())
-        return;
+        return E_FAIL;
     
     const char* user = gLayoutTestController->authenticationUsername().c_str();
     const char* password = gLayoutTestController->authenticationPassword().c_str();