Bug 120502 - Avoid reparsing an XSLT stylesheet after the first failure
Summary: Avoid reparsing an XSLT stylesheet after the first failure
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-08-29 18:06 PDT by Ryosuke Niwa
Modified: 2022-06-03 12:05 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-08-29 18:06:14 PDT
Merge https://chromium.googlesource.com/chromium/blink/+/1debd636044712388392671a3202ec2e6ad08f17
or come up with a better fix.

I can reproduce the crash on ToT WebKit.

Certain libxslt versions appear to leave the doc in an invalid state when parsing fails. We should cache this result and avoid re-parsing.

(The test cannot be converted to text-only due to its invalid stylesheet).
Comment 1 Alexey Proskuryakov 2013-08-30 11:34:48 PDT
> (The test cannot be converted to text-only due to its invalid stylesheet).

This is likely untrue. Should be possible to do that with a subframe or separate window.
Comment 2 Ahmad Saleem 2022-06-03 02:16:15 PDT
I think this has been fixed by adding Blink changes though bit differently.

I looked for "m_compilationFailed" within XSLStyleSheet.h and XSLStyleSheetLibxslt.cpp within Webkit Github mirror as below and it is present.



XSLStyleSheet.h  - https://github.com/WebKit/WebKit/blob/0393f2f7c7a1e97a7a4c63441b50703cc11d493f/Source/WebCore/xml/XSLStyleSheet.h

XSLStyleSheetLibxslt.cpp - https://github.com/WebKit/WebKit/blob/0393f2f7c7a1e97a7a4c63441b50703cc11d493f/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp

Unless if there is anything else or I looked incorrectly, I think this was fixed. Thanks!
Comment 3 Alexey Proskuryakov 2022-06-03 12:05:06 PDT
The test doesn't crash Safari any more, so all must be good.