Bug 121378

Summary: Shrink factory functions
Product: WebKit Reporter: Darin Adler <darin>
Component: WebKit Misc.Assignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, philn, rniwa, webkit-ews, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Darin Adler
Reported 2013-09-15 00:14:27 PDT
Shrink factory functions
Attachments
Patch (43.45 KB, patch)
2013-09-15 00:55 PDT, Darin Adler
no flags
Patch (43.46 KB, patch)
2013-09-15 01:07 PDT, Darin Adler
no flags
Patch (44.24 KB, patch)
2013-09-15 01:24 PDT, Darin Adler
no flags
Patch (48.67 KB, patch)
2013-09-15 01:48 PDT, Darin Adler
no flags
Darin Adler
Comment 1 2013-09-15 00:55:02 PDT
Darin Adler
Comment 2 2013-09-15 01:07:56 PDT
Andreas Kling
Comment 3 2013-09-15 01:10:39 PDT
Comment on attachment 211693 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=211693&action=review r=me > Source/WebCore/ChangeLog:55 > + * html/HTMLElement.cpp: > + (WebCore::populateEventNameForAttributeLocalNameMap): Changed to use an > + AtomicStringImpl* as the key instead of AtomicString, since all the strings > + come from the local names of tags, and so don't need to be ref'd. This saves > + a bit of reference count churn when building the map and is the same pattern > + used in some maps in the make_names.pl script above. Clever. > Source/WebCore/ChangeLog:84 > + (WebCore::WebVTTParser::constructTreeFromToken): Pass docuemnt reference rather than Typo, document. > Source/WebCore/dom/make_names.pl:999 > - print F " if (PassRefPtr<$parameters{namespace}Element> element = function(qName, document, formElement, createdByParser))\n"; > - print F " return element;\n"; > + print F " if (RefPtr<$parameters{namespace}Element> element = function(name, document, formElement, createdByParser))\n"; > + print F " return element.release();\n"; Heh, I resisted telling Sam to make this change just a few hours ago.
Darin Adler
Comment 4 2013-09-15 01:24:34 PDT
Darin Adler
Comment 5 2013-09-15 01:33:35 PDT
I’ll land this once either EWS or my local build is done.
Early Warning System Bot
Comment 6 2013-09-15 01:38:07 PDT
Build Bot
Comment 7 2013-09-15 01:45:06 PDT
Early Warning System Bot
Comment 8 2013-09-15 01:45:39 PDT
Darin Adler
Comment 9 2013-09-15 01:48:41 PDT
Darin Adler
Comment 10 2013-09-15 01:49:01 PDT
Brent Fulgham
Comment 11 2013-09-15 19:35:35 PDT
Comment on attachment 211696 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=211696&action=review > Source/WebCore/dom/make_names.pl:755 > + print(F " new (NotNull, static_cast<void*>(&${lowerNamespace}NamespaceURI)) AtomicString(${lowerNamespace}NS);\n"); This change breaks the Windows build: 10>C:\Projects\WebKit\OpenSource\WebKitBuild\Release\obj32\WebCore\DerivedSources\WebKitFontFamilyNames.cpp(143): error C2440: 'static_cast' : cannot convert from 'const WTF::AtomicString *' to 'void *' 10> Conversion loses qualifiers Perhaps this was doing the wrong thing, and the C-style cast was masking the problem. But the build is now broken. This may be related to the declaration of SKIP_STATIC_CONSTRUCTORS_ON_GCC, which is not active on Windows. Any ideas for resolving this?
Darin Adler
Comment 12 2013-09-15 22:37:01 PDT
Seems fine to change it back to a C-style cast.
Darin Adler
Comment 13 2013-09-16 18:29:10 PDT
According to http://andreaskling.com/~kling/sizes/r155849/WebCore.txt, this patch actually made HTMLNames::init bigger. Something is going wrong.
Note You need to log in before you can comment on or make changes to this bug.