From 1e11b171293a31d64523402fe8fdf3a8074bc695 Mon Sep 17 00:00:00 2001 From: "kuchhal@chromium.org" Date: Fri, 23 Oct 2009 00:03:45 +0000 Subject: Use scoped_array (not scoped_ptr) with new[]. BUG=24266 TEST=No functional change so make sure nothing changes. Review URL: http://codereview.chromium.org/307045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29843 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/urlmon_url_request.cc | 2 +- chrome_frame/utils.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'chrome_frame') diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index efbb260..4d91607 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -367,7 +367,7 @@ STDMETHODIMP UrlmonUrlRequest::OnResponse(DWORD dwResponseCode, InternetGetCookie(url_for_persistent_cookies.c_str(), NULL, NULL, &cookie_size); if (cookie_size) { - scoped_ptr cookies(new wchar_t[cookie_size + 1]); + scoped_array cookies(new wchar_t[cookie_size + 1]); if (!InternetGetCookie(url_for_persistent_cookies.c_str(), NULL, cookies.get(), &cookie_size)) { NOTREACHED() << "InternetGetCookie failed. Error: " << GetLastError(); diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index 246fa0d..fdcb7c7 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -361,7 +361,7 @@ bool GetModuleVersion(HMODULE module, uint32* high, uint32* low) { if (readonly_resource_data && version_resource_size) { // Copy data as VerQueryValue tries to modify the data. This causes // exceptions and heap corruption errors if debugger is attached. - scoped_ptr data(new char[version_resource_size]); + scoped_array data(new char[version_resource_size]); memcpy(data.get(), readonly_resource_data, version_resource_size); if (data.get()) { VS_FIXEDFILEINFO* ver_info = NULL; -- cgit v1.1