Title: [92815] branches/chromium/782/Source/WebCore
Revision
92815
Author
[email protected]
Date
2011-08-10 19:27:50 -0700 (Wed, 10 Aug 2011)

Log Message

2011-08-10  Julien Chaffraix  <[email protected]>

        Unreviewed (4 liners - Chromium only).

        Hack to remove the crash from: (properly solved on trunk)
        https://bugs.webkit.org/show_bug.cgi?id=62884

        This is one of Chromium's top most crashers and merging the fix from the bug (r89445)
        did not help as it relies on other SVG changes being in. This change just
        mitigates the crash until it naturely gets resolved when we roll WebKit revision
        in Chromium.

        * rendering/svg/SVGTextRunRenderingContext.cpp:
        (WebCore::floatWidthOfSubStringUsingSVGFont):
        (WebCore::SVGTextRunRenderingContext::drawTextUsingSVGFont): Added 2 null-checks here.

Modified Paths

Diff

Modified: branches/chromium/782/Source/WebCore/ChangeLog (92814 => 92815)


--- branches/chromium/782/Source/WebCore/ChangeLog	2011-08-11 01:56:06 UTC (rev 92814)
+++ branches/chromium/782/Source/WebCore/ChangeLog	2011-08-11 02:27:50 UTC (rev 92815)
@@ -1,3 +1,19 @@
+2011-08-10  Julien Chaffraix  <[email protected]>
+
+        Unreviewed (4 liners - Chromium only).
+
+        Hack to remove the crash from: (properly solved on trunk)
+        https://bugs.webkit.org/show_bug.cgi?id=62884
+
+        This is one of Chromium's top most crashers and merging the fix from the bug (r89445)
+        did not help as it relies on other SVG changes being in. This change just
+        mitigates the crash until it naturely gets resolved when we roll WebKit revision
+        in Chromium.
+
+        * rendering/svg/SVGTextRunRenderingContext.cpp:
+        (WebCore::floatWidthOfSubStringUsingSVGFont):
+        (WebCore::SVGTextRunRenderingContext::drawTextUsingSVGFont): Added 2 null-checks here.
+
 2011-07-27  Kent Tamura  <[email protected]>
 
         REGRESSION: [Chromium/782] Speech icon should be on the left side for dir=rtl

Modified: branches/chromium/782/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp (92814 => 92815)


--- branches/chromium/782/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp	2011-08-11 01:56:06 UTC (rev 92814)
+++ branches/chromium/782/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp	2011-08-11 02:27:50 UTC (rev 92815)
@@ -269,6 +269,9 @@
         RenderObject* renderObject = referencingRenderObjectFromRun(run);
         RenderObject* parentRenderObject = firstParentRendererForNonTextNode(renderObject); 
 
+        if (!parentRenderObject->node())
+            return 0.0f;
+
         String language = toElement(parentRenderObject->node())->getAttribute(XMLNames::langAttr);
         bool isVerticalText = isVerticalWritingMode(parentRenderObject->style()->svgStyle());
 
@@ -349,6 +352,9 @@
         FloatPoint glyphOrigin;
 
         Node* node = parentRenderObject->node();
+        if (!node)
+            return;
+
         String language = toElement(node)->getAttribute(XMLNames::langAttr);
 
         RenderStyle* parentRenderObjectStyle = parentRenderObject->style();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to