Diff
Modified: trunk/Source/WebCore/ChangeLog (121012 => 121013)
--- trunk/Source/WebCore/ChangeLog 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebCore/ChangeLog 2012-06-22 09:14:01 UTC (rev 121013)
@@ -1,3 +1,23 @@
+2012-06-22 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
+ https://bugs.webkit.org/show_bug.cgi?id=89743
+
+ Since all InspectorClient's are InspectorStateClient's provide a
+ virtual accessor that determines whether or not InspectorClient updates
+ are supported or not.
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/InspectorState.cpp:
+ (WebCore::InspectorState::updateCookie):
+ Don't serialize and message the client if the client doesn't do anything with it.
+
+ * inspector/InspectorStateClient.h:
+ * inspector/WorkerInspectorController.cpp:
+ (WebCore::InspectorStateClient::supportsInspectorStateUpdates):
+ Let the client say whether or not supports updates or not.
+
2012-06-21 Sheriff Bot <[email protected]>
Unreviewed, rolling out r120982.
Modified: trunk/Source/WebCore/inspector/InspectorState.cpp (121012 => 121013)
--- trunk/Source/WebCore/inspector/InspectorState.cpp 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebCore/inspector/InspectorState.cpp 2012-06-22 09:14:01 UTC (rev 121013)
@@ -65,7 +65,7 @@
void InspectorState::updateCookie()
{
- if (m_client && !m_isOnMute)
+ if (m_client && !m_isOnMute && m_client->supportsInspectorStateUpdates())
m_client->updateInspectorStateCookie(m_properties->toJSONString());
}
Modified: trunk/Source/WebCore/inspector/InspectorStateClient.h (121012 => 121013)
--- trunk/Source/WebCore/inspector/InspectorStateClient.h 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebCore/inspector/InspectorStateClient.h 2012-06-22 09:14:01 UTC (rev 121013)
@@ -37,6 +37,7 @@
// Navigation can cause some WebKit implementations to change the view / page / inspector controller instance.
// However, there are some inspector controller states that should survive navigation (such as tracking resources
// or recording timeline) and worker restart. Following callbacks allow embedders to track these states.
+ virtual bool supportsInspectorStateUpdates() const { return false; }
virtual void updateInspectorStateCookie(const String&) { };
};
Modified: trunk/Source/WebCore/inspector/WorkerInspectorController.cpp (121012 => 121013)
--- trunk/Source/WebCore/inspector/WorkerInspectorController.cpp 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebCore/inspector/WorkerInspectorController.cpp 2012-06-22 09:14:01 UTC (rev 121013)
@@ -77,6 +77,7 @@
virtual ~WorkerStateClient() { }
private:
+ virtual bool supportsInspectorStateUpdates() const { return true; }
virtual void updateInspectorStateCookie(const String& cookie)
{
m_workerContext->thread()->workerReportingProxy().updateInspectorStateCookie(cookie);
Modified: trunk/Source/WebKit/blackberry/ChangeLog (121012 => 121013)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-06-22 09:14:01 UTC (rev 121013)
@@ -1,3 +1,13 @@
+2012-06-22 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
+ https://bugs.webkit.org/show_bug.cgi?id=89743
+
+ Reviewed by Yury Semikhatsky.
+
+ * WebCoreSupport/InspectorClientBlackBerry.cpp:
+ (WebCore::InspectorClientBlackBerry::updateInspectorStateCookie):
+
2012-06-21 Parth Patel <[email protected]>
[Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp (121012 => 121013)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp 2012-06-22 09:14:01 UTC (rev 121013)
@@ -87,6 +87,7 @@
void InspectorClientBlackBerry::updateInspectorStateCookie(const String& cookie)
{
+ // If this is implemented, we should override and return true in InspectorStateClient::supportsInspectorStateUpdates().
notImplemented();
};
Modified: trunk/Source/WebKit/chromium/ChangeLog (121012 => 121013)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-22 09:14:01 UTC (rev 121013)
@@ -1,3 +1,17 @@
+2012-06-22 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
+ https://bugs.webkit.org/show_bug.cgi?id=89743
+
+ The Chromium port does want InspectorState updates.
+
+ Reviewed by Yury Semikhatsky.
+
+ * src/InspectorClientImpl.h:
+ (WebKit::InspectorClientImpl::supportsInspectorStateUpdates):
+ * src/WebDevToolsAgentImpl.h:
+ (WebKit::WebDevToolsAgentImpl::supportsInspectorStateUpdates):
+
2012-06-21 Sheriff Bot <[email protected]>
Unreviewed, rolling out r120982.
Modified: trunk/Source/WebKit/chromium/src/InspectorClientImpl.h (121012 => 121013)
--- trunk/Source/WebKit/chromium/src/InspectorClientImpl.h 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebKit/chromium/src/InspectorClientImpl.h 2012-06-22 09:14:01 UTC (rev 121013)
@@ -59,6 +59,7 @@
virtual bool sendMessageToFrontend(const WTF::String&);
+ virtual bool supportsInspectorStateUpdates() const { return true; }
virtual void updateInspectorStateCookie(const WTF::String&);
virtual bool canClearBrowserCache();
Modified: trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h (121012 => 121013)
--- trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h 2012-06-22 08:52:23 UTC (rev 121012)
+++ trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h 2012-06-22 09:14:01 UTC (rev 121013)
@@ -94,6 +94,7 @@
virtual void bringFrontendToFront();
virtual void highlight();
virtual void hideHighlight();
+ virtual bool supportsInspectorStateUpdates() const { return true; }
virtual void updateInspectorStateCookie(const WTF::String&);
virtual bool sendMessageToFrontend(const WTF::String&);