Title: [123901] trunk/Source/WebCore
- Revision
- 123901
- Author
- [email protected]
- Date
- 2012-07-27 11:54:55 -0700 (Fri, 27 Jul 2012)
Log Message
Web Inspector: InspectorPageAgent should ascertain document to be non-null in updateViewMetrics()
https://bugs.webkit.org/show_bug.cgi?id=92476
Patch by Vivek Galatage <[email protected]> on 2012-07-27
Reviewed by Pavel Feldman.
InspectorPageAgent should check for document object being null. As pages created with blank URL might
not have the document object, this causes a crash.
No new tests as added null check.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::updateViewMetrics):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (123900 => 123901)
--- trunk/Source/WebCore/ChangeLog 2012-07-27 18:42:38 UTC (rev 123900)
+++ trunk/Source/WebCore/ChangeLog 2012-07-27 18:54:55 UTC (rev 123901)
@@ -1,3 +1,18 @@
+2012-07-27 Vivek Galatage <[email protected]>
+
+ Web Inspector: InspectorPageAgent should ascertain document to be non-null in updateViewMetrics()
+ https://bugs.webkit.org/show_bug.cgi?id=92476
+
+ Reviewed by Pavel Feldman.
+
+ InspectorPageAgent should check for document object being null. As pages created with blank URL might
+ not have the document object, this causes a crash.
+
+ No new tests as added null check.
+
+ * inspector/InspectorPageAgent.cpp:
+ (WebCore::InspectorPageAgent::updateViewMetrics):
+
2012-07-27 Mike West <[email protected]>
CSP directives containing invalid characters should log an error.
Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (123900 => 123901)
--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2012-07-27 18:42:38 UTC (rev 123900)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2012-07-27 18:54:55 UTC (rev 123901)
@@ -967,7 +967,8 @@
m_client->overrideDeviceMetrics(width, height, static_cast<float>(fontScaleFactor), fitWindow);
Document* document = mainFrame()->document();
- document->styleResolverChanged(RecalcStyleImmediately);
+ if (document)
+ document->styleResolverChanged(RecalcStyleImmediately);
InspectorInstrumentation::mediaQueryResultChanged(document);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes