Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: third_party/WebKit/Source/modules/storage/InspectorDOMStorageAgent.cpp

Issue 1434383002: Oilpan: move InspectedFrames to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix incorrect OwnPtr<> use Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 success = storageId->getBoolean("isLocalStorage", &isLocalStorage); 203 success = storageId->getBoolean("isLocalStorage", &isLocalStorage);
204 if (!success) { 204 if (!success) {
205 if (errorString) 205 if (errorString)
206 *errorString = "Invalid storageId format"; 206 *errorString = "Invalid storageId format";
207 return nullptr; 207 return nullptr;
208 } 208 }
209 209
210 if (!m_page->mainFrame()->isLocalFrame()) 210 if (!m_page->mainFrame()->isLocalFrame())
211 return nullptr; 211 return nullptr;
212 212
213 LocalFrame* frame = InspectedFrames(m_page->deprecatedLocalMainFrame()).fram eWithSecurityOrigin(securityOrigin); 213 OwnPtrWillBeRawPtr<InspectedFrames> inspectedFrames = InspectedFrames::creat e(m_page->deprecatedLocalMainFrame());
214 LocalFrame* frame = inspectedFrames->frameWithSecurityOrigin(securityOrigin) ;
214 if (!frame) { 215 if (!frame) {
215 if (errorString) 216 if (errorString)
216 *errorString = "LocalFrame not found for the given security origin"; 217 *errorString = "LocalFrame not found for the given security origin";
217 return nullptr; 218 return nullptr;
218 } 219 }
219 targetFrame = frame; 220 targetFrame = frame;
220 221
221 if (isLocalStorage) 222 if (isLocalStorage)
222 return StorageNamespace::localStorageArea(frame->document()->securityOri gin()); 223 return StorageNamespace::localStorageArea(frame->document()->securityOri gin());
223 return StorageNamespaceController::from(m_page)->sessionStorage()->storageAr ea(frame->document()->securityOrigin()); 224 return StorageNamespaceController::from(m_page)->sessionStorage()->storageAr ea(frame->document()->securityOrigin());
224 } 225 }
225 226
226 } // namespace blink 227 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698