Build fix after r76459.
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jan 2011 03:26:48 +0000 (03:26 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jan 2011 03:26:48 +0000 (03:26 +0000)
commit7cce607f640fc117d2288d2b8d5a0551065b7dd9
tree32a2b4aa275d66b16dfd05c6973b155bb474e8eb
parent68758542d692a7fa596356fb1a86d3da0252e091
Build fix after r76459.

Static member variables or globals of types that have constructors or destructors are bad as
they generate static initializers and destructors. This is code that is run either at link time
when the library is loaded in to memory or at application termination time. Both of these are
terrible for performance and are thus outlawed in WebKit code.

The typical solution is to replace the static member or global with a function that allocates
the necessary variable on the heap. The variable is leaked to prevent it from being destroyed
at application termination time. The DEFINE_STATIC_LOCAL macro wraps this in to a concise little
package, but sadly fails to work in this case due to the type containing multiple template
parameters.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::inspectorAgents):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::bindInspectorAgent):
(WebCore::InspectorInstrumentation::unbindInspectorAgent):
(WebCore::InspectorInstrumentation::inspectorAgentForPage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h