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

Unified Diff: Source/core/inspector/InspectorDOMStorageAgent.cpp

Issue 898593002: DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorDOMStorageAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMStorageAgent.cpp b/Source/core/inspector/InspectorDOMStorageAgent.cpp
index ee057a76dfb217951b024b8b5d2d6a8b7496cddd..10c7562b48c1e3253b0eb90e009f1a104c4cbf0b 100644
--- a/Source/core/inspector/InspectorDOMStorageAgent.cpp
+++ b/Source/core/inspector/InspectorDOMStorageAgent.cpp
@@ -186,9 +186,9 @@ PassRefPtr<TypeBuilder::DOMStorage::StorageId> InspectorDOMStorageAgent::storage
.setIsLocalStorage(isLocalStorage).release();
}
-void InspectorDOMStorageAgent::didDispatchDOMStorageEvent(const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin)
+void InspectorDOMStorageAgent::didDispatchDOMStorageEvent(LocalFrame* frame, const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin)
{
- if (!m_frontend || !isEnabled())
+ if (!m_frontend || !isEnabled() || !frame->isMainFrame())
yurys 2015/02/03 06:44:00 How are we supposed to track dom storage events in
pfeldman 2015/02/03 07:09:16 I'll replace it with the check for being pageAgent
return;
RefPtr<TypeBuilder::DOMStorage::StorageId> id = storageId(securityOrigin, storageType == LocalStorage);
@@ -226,7 +226,7 @@ PassOwnPtrWillBeRawPtr<StorageArea> InspectorDOMStorageAgent::findStorageArea(Er
if (isLocalStorage)
return StorageNamespace::localStorageArea(frame->document()->securityOrigin());
- return StorageNamespaceController::from(m_pageAgent->page())->sessionStorage()->storageArea(frame->document()->securityOrigin());
+ return StorageNamespaceController::from(frame->page())->sessionStorage()->storageArea(frame->document()->securityOrigin());
yurys 2015/02/03 06:44:00 Frame::page() is being deprecated, you shouldn't a
pfeldman 2015/02/03 07:09:16 This part is particularly stupid. I'll follow up.
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698