Bug 26157

Summary: XPathEvaluator doesn't reuse an explicitly passed result object
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: XMLAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Minor CC: ahmad.saleem792, ap, bfulgham, rniwa, webkit-bug-importer
Priority: P4 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
test case none

Description Alexey Proskuryakov 2009-06-03 01:13:31 PDT
One can pass an XPathResult object to reuse into evaluate(). WebKit just ignores that, and returns a new result object.

I've never seen any code that depended on it though, and it does seem to be a significant optimization opportunity.
Comment 1 Alexey Proskuryakov 2009-06-03 01:14:02 PDT
Created attachment 30896 [details]
test case
Comment 2 Alexey Proskuryakov 2010-11-03 09:46:35 PDT
> it does seem to be a significant optimization opportunity

I meant, does NOT!
Comment 3 Ahmad Saleem 2022-08-04 10:25:10 PDT
I am able to reproduce this bug in Safari 15.6 on macOS 12.5 using attached test case and it shows "FAIL" for Safari 15.6 and Chrome Canary 106. While Firefox Nightly 105 show it as "PASS". Thanks!
Comment 4 Radar WebKit Bug Importer 2022-08-04 10:38:07 PDT
<rdar://problem/98134829>