Bug 137447

Summary: AX: Avoid unnecessary copies in invalidStatus method
Product: WebKit Reporter: Krzysztof Czech <k.czech>
Component: AccessibilityAssignee: Krzysztof Czech <k.czech>
Status: RESOLVED WONTFIX    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, commit-queue, darin, dmazzoni, jcraig, jdiggs, kling, mario, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch cfleizach: review-

Description Krzysztof Czech 2014-10-06 05:40:33 PDT
Seems invalidStatus() method could be slightly changed so that it could return reference s to local static objects.
Comment 1 Radar WebKit Bug Importer 2014-10-06 05:40:55 PDT
<rdar://problem/18553813>
Comment 2 Krzysztof Czech 2014-10-06 05:52:52 PDT
Created attachment 239331 [details]
proposed patch
Comment 3 chris fleizach 2014-10-06 07:13:35 PDT
Comment on attachment 239331 [details]
proposed patch

At some point I know we changed this to not be statics because people thought the cost of statics were higher than the cost of doing a string copy. I don't know what the current thinking is
Comment 4 Krzysztof Czech 2014-10-06 07:47:28 PDT
(In reply to comment #3)
> (From update of attachment 239331 [details])
> At some point I know we changed this to not be statics because people thought the cost of statics were higher than the cost of doing a string copy. I don't know what the current thinking is
Thanks for clarifying me this, I do not know either what the current thinking is.
Comment 5 chris fleizach 2014-10-06 08:40:36 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 239331 [details] [details])
> > At some point I know we changed this to not be statics because people thought the cost of statics were higher than the cost of doing a string copy. I don't know what the current thinking is
> Thanks for clarifying me this, I do not know either what the current thinking is.

My guess is that unless this is a hot patch of code people would probably prefer to not make more statics. 

Thx
Comment 6 Krzysztof Czech 2014-10-07 00:40:07 PDT
Thanks Chris for putting some light on this. It seems we should carefully add new statics.
Comment 7 chris fleizach 2014-12-03 09:53:40 PST
Comment on attachment 239331 [details]
proposed patch

I think we should probably skip this. Do you agree?
Comment 8 Krzysztof Czech 2014-12-05 00:44:08 PST
(In reply to comment #7)
> Comment on attachment 239331 [details]
> proposed patch
> 
> I think we should probably skip this. Do you agree?

Thanks Chris, yes I agree we should skip this one.