Title: [152993] branches/safari-537-branch/Source/WebCore
- Revision
- 152993
- Author
- [email protected]
- Date
- 2013-07-22 14:12:38 -0700 (Mon, 22 Jul 2013)
Log Message
Merged r152743. <rdar://problem/14459780>
Modified Paths
Diff
Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (152992 => 152993)
--- branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-22 21:09:58 UTC (rev 152992)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-22 21:12:38 UTC (rev 152993)
@@ -1,5 +1,26 @@
2013-07-22 Lucas Forschler <[email protected]>
+ Merge r152743
+
+ 2013-07-16 Andreas Kling <[email protected]>
+
+ Atomicize HTMLAnchorElement.hash before passing it to JS.
+ <http://webkit.org/b/118748>
+ <rdar://problem/14459780>
+
+ Reviewed by Sam Weinig.
+
+ Instead of generating a unique string from '#' + the URL hash every time HTMLAnchorElement.hash
+ is queried, turn it into an AtomicString. This prevents massive memory usage in scripts that
+ fetch .hash a lot.
+
+ Reduces memory consumption by 4.65 MB when viewing the full HTML5 spec at <http://whatwg.org/c>
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::hash):
+
+2013-07-22 Lucas Forschler <[email protected]>
+
Merge r152721
2013-07-16 Eric Carlson <[email protected]>
Modified: branches/safari-537-branch/Source/WebCore/html/HTMLAnchorElement.cpp (152992 => 152993)
--- branches/safari-537-branch/Source/WebCore/html/HTMLAnchorElement.cpp 2013-07-22 21:09:58 UTC (rev 152992)
+++ branches/safari-537-branch/Source/WebCore/html/HTMLAnchorElement.cpp 2013-07-22 21:12:38 UTC (rev 152993)
@@ -336,7 +336,9 @@
String HTMLAnchorElement::hash() const
{
String fragmentIdentifier = href().fragmentIdentifier();
- return fragmentIdentifier.isEmpty() ? emptyString() : "#" + fragmentIdentifier;
+ if (fragmentIdentifier.isEmpty())
+ return emptyString();
+ return AtomicString(String("#" + fragmentIdentifier));
}
void HTMLAnchorElement::setHash(const String& value)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes