Windows build fixes
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Apr 2008 21:48:49 +0000 (21:48 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Apr 2008 21:48:49 +0000 (21:48 +0000)
        Replace COMPtr::operator& with COMPtr::adoptionPointer.

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

WebKitTools/ChangeLog
WebKitTools/Drosera/win/DebuggerClient.cpp
WebKitTools/Drosera/win/DebuggerDocumentPlatform.cpp
WebKitTools/Drosera/win/Drosera.cpp
WebKitTools/Drosera/win/ServerConnection.cpp
WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
WebKitTools/DumpRenderTree/win/EditingDelegate.cpp
WebKitTools/DumpRenderTree/win/EventSender.cpp
WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp
WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp

index 3aa7470..62eb890 100644 (file)
@@ -1,3 +1,9 @@
+2008-04-29  Adam Roben  <aroben@apple.com>
+
+        Windows build fixes
+
+        Replace COMPtr::operator& with COMPtr::adoptionPointer.
+
 2008-04-25  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
index 77b689c..49abb8d 100644 (file)
@@ -160,7 +160,7 @@ HRESULT STDMETHODCALLTYPE DebuggerClient::didFinishLoadForFrame(
     m_webViewLoaded = true;
 
     COMPtr<IWebFrame> mainFrame;
-    ret = webView->mainFrame(&mainFrame);
+    ret = webView->mainFrame(mainFrame.adoptionPointer());
     if (FAILED(ret))
         return ret;
 
@@ -261,7 +261,7 @@ HRESULT STDMETHODCALLTYPE DebuggerClient::createWebViewWithRequest(
 
         if (!requestIsEmpty) {
             COMPtr<IWebFrame> mainFrame;
-            ret = view->mainFrame(&mainFrame);
+            ret = view->mainFrame(mainFrame.adoptionPointer());
             if (FAILED(ret))
                 return ret;
 
index f23daf7..851efd8 100644 (file)
@@ -91,7 +91,7 @@ void DebuggerDocument::getPlatformCurrentFunctionStack(JSContextRef context, Vec
         if (FAILED(frame->functionName(&function)))
             return;
 
-        if (FAILED(frame->caller(&caller)))
+        if (FAILED(frame->caller(caller.adoptionPointer())))
             return;
 
         if (!function) {
@@ -118,7 +118,7 @@ void DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame(JSContextR
     VariantInit(&var);
 
     COMPtr<IEnumVARIANT> localScopeVariableNames;
-    if (FAILED(cframe->variableNames(&localScopeVariableNames)))
+    if (FAILED(cframe->variableNames(localScopeVariableNames.adoptionPointer())))
         return;
 
     while (localScopeVariableNames->Next(1, &var, 0) == S_OK) {
index 820054f..2beb942 100644 (file)
@@ -350,7 +350,7 @@ HRESULT Drosera::attach()
         return ret;
 
     COMPtr<IWebFrame> mainFrame;
-    ret = m_webView->mainFrame(&mainFrame);
+    ret = m_webView->mainFrame(mainFrame.adoptionPointer());
     if (FAILED(ret))
         return ret;
 
index de2b416..03465e4 100644 (file)
@@ -69,7 +69,7 @@ void ServerConnection::attemptToCreateServerConnection(JSGlobalContextRef global
     if (FAILED(CoCreateInstance(clsid, 0, CLSCTX_LOCAL_SERVER, IID_IWebScriptDebugServer, (void**)&tempServer)))
         return;
 
-    if (FAILED(tempServer->sharedWebScriptDebugServer(&m_server)))
+    if (FAILED(tempServer->sharedWebScriptDebugServer(m_server.adoptionPointer())))
         return;
 
     if (FAILED(m_server->addListener(this))) {
@@ -145,7 +145,7 @@ HRESULT STDMETHODCALLTYPE ServerConnection::didLoadMainResourceForDataSource(
 
     // Get document source
     COMPtr<IWebDocumentRepresentation> rep;
-    ret = dataSource->representation(&rep);
+    ret = dataSource->representation(rep.adoptionPointer());
     if (FAILED(ret))
         return ret;
 
@@ -166,7 +166,7 @@ HRESULT STDMETHODCALLTYPE ServerConnection::didLoadMainResourceForDataSource(
 
     // Get URL
     COMPtr<IWebURLResponse> response;
-    ret = dataSource->response(&response);
+    ret = dataSource->response(response.adoptionPointer());
     if (FAILED(ret))
         return ret;
 
@@ -196,12 +196,12 @@ HRESULT STDMETHODCALLTYPE ServerConnection::didParseSource(
         return ret;
 
     COMPtr<IWebDataSource> dataSource;
-    ret = webFrame->dataSource(&dataSource);
+    ret = webFrame->dataSource(dataSource.adoptionPointer());
     if (FAILED(ret))
         return ret;
 
     COMPtr<IWebURLResponse> response;
-    ret = dataSource->response(&response);
+    ret = dataSource->response(response.adoptionPointer());
     if (FAILED(ret))
         return ret;
 
@@ -213,7 +213,7 @@ HRESULT STDMETHODCALLTYPE ServerConnection::didParseSource(
     BSTR documentSource = 0;
     if (!url || !wcscmp(responseURL, url)) {
         COMPtr<IWebDocumentRepresentation> rep;
-        ret = dataSource->representation(&rep);
+        ret = dataSource->representation(rep.adoptionPointer());
         if (FAILED(ret))
             return ret;
 
@@ -358,7 +358,7 @@ COMPtr<IWebScriptCallFrame> ServerConnection::getCallerFrame(int callFrame) cons
     COMPtr<IWebScriptCallFrame> cframe = currentFrame();
     for (int count = 0; count < callFrame; count++) {
         COMPtr<IWebScriptCallFrame> callerFrame;
-        if (FAILED(cframe->caller(&callerFrame)))
+        if (FAILED(cframe->caller(callerFrame.adoptionPointer())))
             return 0;
 
         cframe = callerFrame;
index f4c66fd..c4575a8 100644 (file)
@@ -255,7 +255,7 @@ void dumpFrameScrollPosition(IWebFrame* frame)
         return;
 
     COMPtr<IWebFramePrivate> framePrivate;
-    if (FAILED(frame->QueryInterface(&framePrivate)))
+    if (FAILED(frame->QueryInterface(framePrivate.adoptionPointer())))
         return;
 
     SIZE scrollPosition;
@@ -264,7 +264,7 @@ void dumpFrameScrollPosition(IWebFrame* frame)
 
     if (abs(scrollPosition.cx) > 0.00000001 || abs(scrollPosition.cy) > 0.00000001) {
         COMPtr<IWebFrame> parent;
-        if (FAILED(frame->parentFrame(&parent)))
+        if (FAILED(frame->parentFrame(parent.adoptionPointer())))
             return;
         if (parent) {
             BSTR name;
@@ -278,7 +278,7 @@ void dumpFrameScrollPosition(IWebFrame* frame)
 
     if (::layoutTestController->dumpChildFrameScrollPositions()) {
         COMPtr<IEnumVARIANT> enumKids;
-        if (FAILED(frame->childFrames(&enumKids)))
+        if (FAILED(frame->childFrames(enumKids.adoptionPointer())))
             return;
         VARIANT var;
         VariantInit(&var);
@@ -298,18 +298,18 @@ static wstring dumpFramesAsText(IWebFrame* frame)
         return L"";
 
     COMPtr<IDOMDocument> document;
-    if (FAILED(frame->DOMDocument(&document)))
+    if (FAILED(frame->DOMDocument(document.adoptionPointer())))
         return L"";
 
     COMPtr<IDOMElement> documentElement;
-    if (FAILED(document->documentElement(&documentElement)))
+    if (FAILED(document->documentElement(documentElement.adoptionPointer())))
         return L"";
 
     wstring result;
 
     // Add header for all but the main frame.
     COMPtr<IWebFrame> parent;
-    if (FAILED(frame->parentFrame(&parent)))
+    if (FAILED(frame->parentFrame(parent.adoptionPointer())))
         return L"";
     if (parent) {
         BSTR name = L"";
@@ -325,7 +325,7 @@ static wstring dumpFramesAsText(IWebFrame* frame)
 
     BSTR innerText = 0;
     COMPtr<IDOMElementPrivate> docPrivate;
-    if (SUCCEEDED(documentElement->QueryInterface(&docPrivate)))
+    if (SUCCEEDED(documentElement->QueryInterface(docPrivate.adoptionPointer())))
         docPrivate->innerText(&innerText);
 
     result.append(innerText ? innerText : L"", SysStringLen(innerText));
@@ -335,7 +335,7 @@ static wstring dumpFramesAsText(IWebFrame* frame)
 
     if (::layoutTestController->dumpChildFramesAsText()) {
         COMPtr<IEnumVARIANT> enumKids;
-        if (FAILED(frame->childFrames(&enumKids)))
+        if (FAILED(frame->childFrames(enumKids.adoptionPointer())))
             return L"";
         VARIANT var;
         VariantInit(&var);
@@ -354,11 +354,11 @@ static wstring dumpFramesAsText(IWebFrame* frame)
 static int compareHistoryItems(const void* item1, const void* item2)
 {
     COMPtr<IWebHistoryItemPrivate> itemA;
-    if (FAILED((*(COMPtr<IUnknown>*)item1)->QueryInterface(&itemA)))
+    if (FAILED((*(COMPtr<IUnknown>*)item1)->QueryInterface(itemA.adoptionPointer())))
         return 0;
 
     COMPtr<IWebHistoryItemPrivate> itemB;
-    if (FAILED((*(COMPtr<IUnknown>*)item2)->QueryInterface(&itemB)))
+    if (FAILED((*(COMPtr<IUnknown>*)item2)->QueryInterface(itemB.adoptionPointer())))
         return 0;
 
     BSTR targetA;
@@ -396,7 +396,7 @@ static void dumpHistoryItem(IWebHistoryItem* item, int indent, bool current)
     SysFreeString(url);
 
     COMPtr<IWebHistoryItemPrivate> itemPrivate;
-    if (FAILED(item->QueryInterface(&itemPrivate)))
+    if (FAILED(item->QueryInterface(itemPrivate.adoptionPointer())))
         return;
 
     BSTR target;
@@ -445,7 +445,7 @@ static void dumpHistoryItem(IWebHistoryItem* item, int indent, bool current)
 
     for (unsigned i = 0; i < kidsCount; ++i) {
         COMPtr<IWebHistoryItem> item;
-        kidsVector[i]->QueryInterface(&item);
+        kidsVector[i]->QueryInterface(item.adoptionPointer());
         dumpHistoryItem(item.get(), indent + 4, false);
     }
 
@@ -461,7 +461,7 @@ static void dumpBackForwardList(IWebView* webView)
     printf("\n============== Back Forward List ==============\n");
 
     COMPtr<IWebBackForwardList> bfList;
-    if (FAILED(webView->backForwardList(&bfList)))
+    if (FAILED(webView->backForwardList(bfList.adoptionPointer())))
         return;
 
     // Print out all items in the list after prevTestBFItem, which was from the previous test
@@ -475,22 +475,22 @@ static void dumpBackForwardList(IWebView* webView)
 
     for (int i = forwardListCount; i > 0; --i) {
         COMPtr<IWebHistoryItem> item;
-        if (FAILED(bfList->itemAtIndex(i, &item)))
+        if (FAILED(bfList->itemAtIndex(i, item.adoptionPointer())))
             return;
         // something is wrong if the item from the last test is in the forward part of the b/f list
         assert(item != prevTestBFItem);
         COMPtr<IUnknown> itemUnknown;
-        item->QueryInterface(&itemUnknown);
+        item->QueryInterface(itemUnknown.adoptionPointer());
         itemsToPrint.append(itemUnknown);
     }
     
     COMPtr<IWebHistoryItem> currentItem;
-    if (FAILED(bfList->currentItem(&currentItem)))
+    if (FAILED(bfList->currentItem(currentItem.adoptionPointer())))
         return;
 
     assert(currentItem != prevTestBFItem);
     COMPtr<IUnknown> currentItemUnknown;
-    currentItem->QueryInterface(&currentItemUnknown);
+    currentItem->QueryInterface(currentItemUnknown.adoptionPointer());
     itemsToPrint.append(currentItemUnknown);
     int currentItemIndex = itemsToPrint.size() - 1;
 
@@ -500,18 +500,18 @@ static void dumpBackForwardList(IWebView* webView)
 
     for (int i = -1; i >= -backListCount; --i) {
         COMPtr<IWebHistoryItem> item;
-        if (FAILED(bfList->itemAtIndex(i, &item)))
+        if (FAILED(bfList->itemAtIndex(i, item.adoptionPointer())))
             return;
         if (item == prevTestBFItem)
             break;
         COMPtr<IUnknown> itemUnknown;
-        item->QueryInterface(&itemUnknown);
+        item->QueryInterface(itemUnknown.adoptionPointer());
         itemsToPrint.append(itemUnknown);
     }
 
     for (int i = itemsToPrint.size() - 1; i >= 0; --i) {
         COMPtr<IWebHistoryItem> historyItemToPrint;
-        itemsToPrint[i]->QueryInterface(&historyItemToPrint);
+        itemsToPrint[i]->QueryInterface(historyItemToPrint.adoptionPointer());
         dumpHistoryItem(historyItemToPrint.get(), 8, i == currentItemIndex);
     }
 
@@ -531,9 +531,9 @@ static void dumpBackForwardListForAllWindows()
 void dump()
 {
     COMPtr<IWebDataSource> dataSource;
-    if (SUCCEEDED(frame->dataSource(&dataSource))) {
+    if (SUCCEEDED(frame->dataSource(dataSource.adoptionPointer()))) {
         COMPtr<IWebURLResponse> response;
-        if (SUCCEEDED(dataSource->response(&response)) && response) {
+        if (SUCCEEDED(dataSource->response(response.adoptionPointer())) && response) {
             BSTR mimeType;
             if (SUCCEEDED(response->MIMEType(&mimeType)))
                 ::layoutTestController->setDumpAsText(::layoutTestController->dumpAsText() | !_tcscmp(mimeType, TEXT("text/plain")));
@@ -566,7 +566,7 @@ void dump()
             ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
 
             COMPtr<IWebFramePrivate> framePrivate;
-            if (FAILED(frame->QueryInterface(&framePrivate)))
+            if (FAILED(frame->QueryInterface(framePrivate.adoptionPointer())))
                 goto fail;
             framePrivate->renderTreeAsExternalRepresentation(&resultString);
         }
@@ -617,7 +617,7 @@ static bool shouldLogFrameLoadDelegates(const char* pathOrURL)
 static void resetWebViewToConsistentStateBeforeTesting()
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView))) 
+    if (FAILED(frame->webView(webView.adoptionPointer()))) 
         return;
 
     webView->setPolicyDelegate(0);
@@ -629,7 +629,7 @@ static void resetWebViewToConsistentStateBeforeTesting()
     }
 
     COMPtr<IWebPreferences> preferences;
-    if (SUCCEEDED(webView->preferences(&preferences))) {
+    if (SUCCEEDED(webView->preferences(preferences.adoptionPointer()))) {
         preferences->setPrivateBrowsingEnabled(FALSE);
         preferences->setJavaScriptCanOpenWindowsAutomatically(TRUE);
 
@@ -700,10 +700,10 @@ static void runTest(const char* pathOrURL)
 
     prevTestBFItem = 0;
     COMPtr<IWebView> webView;
-    if (SUCCEEDED(frame->webView(&webView))) {
+    if (SUCCEEDED(frame->webView(webView.adoptionPointer()))) {
         COMPtr<IWebBackForwardList> bfList;
-        if (SUCCEEDED(webView->backForwardList(&bfList)))
-            bfList->currentItem(&prevTestBFItem);
+        if (SUCCEEDED(webView->backForwardList(bfList.adoptionPointer())))
+            bfList->currentItem(prevTestBFItem.adoptionPointer());
     }
 
     WorkQueue::shared()->clear();
@@ -936,7 +936,7 @@ IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow)
         return 0;
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (FAILED(webView->QueryInterface(&viewPrivate)))
+    if (FAILED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         return 0;
 
     viewPrivate->setShouldApplyMacFontAscentHack(TRUE);
@@ -968,7 +968,7 @@ IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow)
         return 0;
 
     COMPtr<IWebViewEditing> viewEditing;
-    if (FAILED(webView->QueryInterface(&viewEditing)))
+    if (FAILED(webView->QueryInterface(viewEditing.adoptionPointer())))
         return 0;
 
     if (FAILED(viewEditing->setEditingDelegate(sharedEditingDelegate.get())))
@@ -978,7 +978,7 @@ IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow)
         return 0;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return 0;
 
     initializePreferences(preferences.get());
@@ -1032,7 +1032,7 @@ int main(int argc, char* argv[])
     COMPtr<IWebIconDatabase> tmpIconDatabase;
     if (FAILED(CoCreateInstance(CLSID_WebIconDatabase, 0, CLSCTX_ALL, IID_IWebIconDatabase, (void**)&tmpIconDatabase)))
         return -1;
-    if (FAILED(tmpIconDatabase->sharedIconDatabase(&iconDatabase)))
+    if (FAILED(tmpIconDatabase->sharedIconDatabase(iconDatabase.adoptionPointer())))
         return -1;
         
     if (FAILED(webView->mainFrame(&frame)))
index 7add64e..52d4d90 100644 (file)
@@ -86,7 +86,7 @@ static wstring dumpPath(IDOMNode* node)
     SysFreeString(name);
 
     COMPtr<IDOMNode> parent;
-    if (SUCCEEDED(node->parentNode(&parent)))
+    if (SUCCEEDED(node->parentNode(parent.adoptionPointer())))
         result += TEXT(" > ") + dumpPath(parent.get());
 
     return result;
@@ -105,11 +105,11 @@ static wstring dump(IDOMRange* range)
         return 0;
 
     COMPtr<IDOMNode> startContainer;
-    if (FAILED(range->startContainer(&startContainer)))
+    if (FAILED(range->startContainer(startContainer.adoptionPointer())))
         return 0;
 
     COMPtr<IDOMNode> endContainer;
-    if (FAILED(range->endContainer(&endContainer)))
+    if (FAILED(range->endContainer(endContainer.adoptionPointer())))
         return 0;
 
     wchar_t buffer[1024];
index 15539cc..caee293 100644 (file)
@@ -130,7 +130,7 @@ static LRESULT dispatchMessage(const MSG* msg)
 static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     COMPtr<IWebFramePrivate> framePrivate;
-    if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+    if (SUCCEEDED(frame->QueryInterface(framePrivate.adoptionPointer())))
         framePrivate->layout();
 
     down = true;
@@ -146,7 +146,7 @@ static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef functio
 static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     COMPtr<IWebFramePrivate> framePrivate;
-    if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+    if (SUCCEEDED(frame->QueryInterface(framePrivate.adoptionPointer())))
         framePrivate->layout();
 
     down = true;
@@ -173,7 +173,7 @@ static inline POINTL pointl(const POINT& point)
 static void doMouseUp(MSG msg)
 {
     COMPtr<IWebFramePrivate> framePrivate;
-    if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+    if (SUCCEEDED(frame->QueryInterface(framePrivate.adoptionPointer())))
         framePrivate->layout();
 
     dispatchMessage(&msg);
@@ -182,7 +182,7 @@ static void doMouseUp(MSG msg)
     if (draggingInfo) {
         COMPtr<IWebView> webView;
         COMPtr<IDropTarget> webViewDropTarget;
-        if (SUCCEEDED(frame->webView(&webView)) && SUCCEEDED(webView->QueryInterface(IID_IDropTarget, (void**)&webViewDropTarget))) {
+        if (SUCCEEDED(frame->webView(webView.adoptionPointer())) && SUCCEEDED(webView->QueryInterface(IID_IDropTarget, (void**)&webViewDropTarget))) {
             POINT screenPoint = msg.pt;
             DWORD effect = 0;
             ::ClientToScreen(webViewWindow, &screenPoint);
@@ -220,7 +220,7 @@ static JSValueRef mouseUpCallback(JSContextRef context, JSObjectRef function, JS
 static void doMouseMove(MSG msg)
 {
     COMPtr<IWebFramePrivate> framePrivate;
-    if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+    if (SUCCEEDED(frame->QueryInterface(framePrivate.adoptionPointer())))
         framePrivate->layout();
 
     dispatchMessage(&msg);
@@ -348,7 +348,7 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
     static const JSStringRef lengthProperty = JSStringCreateWithUTF8CString("length");
 
     COMPtr<IWebFramePrivate> framePrivate;
-    if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+    if (SUCCEEDED(frame->QueryInterface(framePrivate.adoptionPointer())))
         framePrivate->layout();
     
     JSStringRef character = JSValueToStringCopy(context, arguments[0], exception);
@@ -448,7 +448,7 @@ static JSValueRef dispatchMessageCallback(JSContextRef context, JSObjectRef func
         return JSValueMakeUndefined(context);
 
     COMPtr<IWebFramePrivate> framePrivate;
-    if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+    if (SUCCEEDED(frame->QueryInterface(framePrivate.adoptionPointer())))
         framePrivate->layout();
     
     MSG msg = {};
@@ -481,7 +481,7 @@ static JSValueRef dispatchMessageCallback(JSContextRef context, JSObjectRef func
 static JSValueRef textZoomInCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return JSValueMakeUndefined(context);
 
     COMPtr<IWebIBActions> webIBActions(Query, webView);
@@ -495,7 +495,7 @@ static JSValueRef textZoomInCallback(JSContextRef context, JSObjectRef function,
 static JSValueRef textZoomOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return JSValueMakeUndefined(context);
 
     COMPtr<IWebIBActions> webIBActions(Query, webView);
@@ -509,7 +509,7 @@ static JSValueRef textZoomOutCallback(JSContextRef context, JSObjectRef function
 static JSValueRef zoomPageInCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return JSValueMakeUndefined(context);
 
     COMPtr<IWebIBActions> webIBActions(Query, webView);
@@ -523,7 +523,7 @@ static JSValueRef zoomPageInCallback(JSContextRef context, JSObjectRef function,
 static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return JSValueMakeUndefined(context);
 
     COMPtr<IWebIBActions> webIBActions(Query, webView);
index b21d34e..1a63be1 100644 (file)
@@ -60,11 +60,11 @@ string BSTRtoString(BSTR bstr)
 string descriptionSuitableForTestResult(IWebFrame* webFrame)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(webFrame->webView(&webView)))
+    if (FAILED(webFrame->webView(webView.adoptionPointer())))
         return string();
 
     COMPtr<IWebFrame> mainFrame;
-    if (FAILED(webView->mainFrame(&mainFrame)))
+    if (FAILED(webView->mainFrame(mainFrame.adoptionPointer())))
         return string();
 
     if (webFrame == mainFrame)
@@ -156,7 +156,7 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didCommitLoadForFrame(
     /* [in] */ IWebFrame *frame)
 {
     COMPtr<IWebViewPrivate> webViewPrivate;
-    HRESULT hr = webView->QueryInterface(&webViewPrivate);
+    HRESULT hr = webView->QueryInterface(webViewPrivate.adoptionPointer());
     if (FAILED(hr))
         return hr;
     webViewPrivate->updateFocusedAndActiveState();
index 373091b..39b55f7 100644 (file)
@@ -55,20 +55,20 @@ static bool resolveCygwinPath(const wstring& cygwinPath, wstring& windowsPath);
 LayoutTestController::~LayoutTestController()
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     // reset webview-related states back to default values in preparation for next test
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (SUCCEEDED(webView->QueryInterface(&viewPrivate)))
+    if (SUCCEEDED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         viewPrivate->setTabKeyCyclesThroughElements(TRUE);
 
     COMPtr<IWebViewEditing> viewEditing;
-    if (FAILED(webView->QueryInterface(&viewEditing)))
+    if (FAILED(webView->QueryInterface(viewEditing.adoptionPointer())))
         return;
     COMPtr<IWebEditingDelegate> delegate;
-    if (FAILED(viewEditing->editingDelegate(&delegate)))
+    if (FAILED(viewEditing->editingDelegate(delegate.adoptionPointer())))
         return;
     COMPtr<EditingDelegate> editingDelegate(Query, viewEditing.get());
     if (editingDelegate)
@@ -83,15 +83,15 @@ void LayoutTestController::addDisallowedURL(JSStringRef url)
 void LayoutTestController::clearBackForwardList()
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebBackForwardList> backForwardList;
-    if (FAILED(webView->backForwardList(&backForwardList)))
+    if (FAILED(webView->backForwardList(backForwardList.adoptionPointer())))
         return;
 
     COMPtr<IWebHistoryItem> item;
-    if (FAILED(backForwardList->currentItem(&item)))
+    if (FAILED(backForwardList->currentItem(item.adoptionPointer())))
         return;
 
     // We clear the history by setting the back/forward list's capacity to 0
@@ -182,11 +182,11 @@ static wstring jsStringRefToWString(JSStringRef jsStr)
 void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
 {
     COMPtr<IWebDataSource> dataSource;
-    if (FAILED(frame->dataSource(&dataSource)))
+    if (FAILED(frame->dataSource(dataSource.adoptionPointer())))
         return;
 
     COMPtr<IWebURLResponse> response;
-    if (FAILED(dataSource->response(&response)) || !response)
+    if (FAILED(dataSource->response(response.adoptionPointer())) || !response)
         return;
 
     BSTR responseURLBSTR;
@@ -220,15 +220,15 @@ void LayoutTestController::queueScript(JSStringRef script)
 void LayoutTestController::setAcceptsEditing(bool acceptsEditing)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebViewEditing> viewEditing;
-    if (FAILED(webView->QueryInterface(&viewEditing)))
+    if (FAILED(webView->QueryInterface(viewEditing.adoptionPointer())))
         return;
 
     COMPtr<IWebEditingDelegate> delegate;
-    if (FAILED(viewEditing->editingDelegate(&delegate)))
+    if (FAILED(viewEditing->editingDelegate(delegate.adoptionPointer())))
         return;
 
     EditingDelegate* editingDelegate = (EditingDelegate*)(IWebEditingDelegate*)delegate.get();
@@ -238,11 +238,11 @@ void LayoutTestController::setAcceptsEditing(bool acceptsEditing)
 void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
@@ -255,7 +255,7 @@ void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
 void LayoutTestController::setCustomPolicyDelegate(bool setDelegate)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     if (setDelegate)
@@ -272,11 +272,11 @@ void LayoutTestController::setMainFrameIsFirstResponder(bool flag)
 void LayoutTestController::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
     preferences->setPrivateBrowsingEnabled(privateBrowsingEnabled);
@@ -285,11 +285,11 @@ void LayoutTestController::setPrivateBrowsingEnabled(bool privateBrowsingEnabled
 void LayoutTestController::setPopupBlockingEnabled(bool privateBrowsingEnabled)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
     preferences->setJavaScriptCanOpenWindowsAutomatically(!privateBrowsingEnabled);
@@ -298,11 +298,11 @@ void LayoutTestController::setPopupBlockingEnabled(bool privateBrowsingEnabled)
 void LayoutTestController::setTabKeyCyclesThroughElements(bool shouldCycle)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (FAILED(webView->QueryInterface(&viewPrivate)))
+    if (FAILED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         return;
 
     viewPrivate->setTabKeyCyclesThroughElements(shouldCycle ? TRUE : FALSE);
@@ -316,11 +316,11 @@ void LayoutTestController::setUseDashboardCompatibilityMode(bool flag)
 void LayoutTestController::setUserStyleSheetEnabled(bool flag)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
    preferences->setUserStyleSheetEnabled(flag);
@@ -437,11 +437,11 @@ static wstring cfStringRefToWString(CFStringRef cfStr)
 void LayoutTestController::setUserStyleSheetLocation(JSStringRef jsURL)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
     RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
@@ -492,11 +492,11 @@ void LayoutTestController::clearPersistentUserStyleSheet()
 void LayoutTestController::setWindowIsKey(bool flag)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (FAILED(webView->QueryInterface(&viewPrivate)))
+    if (FAILED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         return;
 
     HWND webViewWindow;
@@ -537,11 +537,11 @@ void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
     wstring wValue = jsStringRefToWString(value);
 
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (FAILED(webView->QueryInterface(&viewPrivate)))
+    if (FAILED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         return;
 
     BSTR nameBSTR = SysAllocStringLen((OLECHAR*)wName.c_str(), wName.length());
index 4113c9e..aed18d1 100644 (file)
@@ -58,7 +58,7 @@ void LoadItem::invoke() const
         targetFrame = frame;
     else {
         BSTR targetBSTR = SysAllocString(targetString.c_str());
-        bool failed = FAILED(frame->findFrameNamed(targetBSTR, &targetFrame));
+        bool failed = FAILED(frame->findFrameNamed(targetBSTR, targetFrame.adoptionPointer()));
         SysFreeString(targetBSTR);
         if (failed)
             return;
@@ -81,18 +81,18 @@ void LoadItem::invoke() const
 void ReloadItem::invoke() const
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebIBActions> webActions;
-    if (SUCCEEDED(webView->QueryInterface(&webActions)))
+    if (SUCCEEDED(webView->QueryInterface(webActions.adoptionPointer())))
         webActions->reload(0);
 }
 
 void ScriptItem::invoke() const
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     wstring scriptString = jsStringRefToWString(script());
@@ -107,7 +107,7 @@ void ScriptItem::invoke() const
 void BackForwardItem::invoke() const
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     BOOL result;
@@ -122,11 +122,11 @@ void BackForwardItem::invoke() const
     }
     
     COMPtr<IWebBackForwardList> bfList;
-    if (FAILED(webView->backForwardList(&bfList)))
+    if (FAILED(webView->backForwardList(bfList.adoptionPointer())))
         return;
 
     COMPtr<IWebHistoryItem> item;
-    if (FAILED(bfList->itemAtIndex(m_howFar, &item)))
+    if (FAILED(bfList->itemAtIndex(m_howFar, item.adoptionPointer())))
         return;
 
     webView->goToBackForwardItem(item.get(), &result);