[Webkit-unassigned] [Bug 10323] REGRESSION: javascript: URL containing '\\' gets passed as '//'

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Thu Sep 7 07:48:54 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=10323


darin at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #10429|review?                     |review-
               Flag|                            |




------- Comment #7 from darin at apple.com  2006-09-07 07:48 PDT -------
(From update of attachment 10429)
Thanks for tackling this!

The patch has an object lifetime problem. The result of substituteBackslashes,
with this code change, will only live until the end of the expression that
initializes rel, leaving rel referring to a deleted object. There's a reason
that the subsitutedRelative variable was declared outside the if statement in
the old code, and this new code is broken.

I am surprised to see an explicit check for the javascript scheme here. I
thought we were going to do this based on hierarchical vs. non-hierarchical
URLs. And I'd really like the backslash hack to be an exception rather than the
rule -- it would be better to have limited cases where it *does* happen rather
than limited cases where it does not.

That having been said, I think this approach is OK, but not great.

There's also a missing space before "false" in the function call.

review- just for the object lifetime problem; otherwise this is fine.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list