return func;
}
-#ifdef ANDROID_INSTRUMENT
-static size_t nodesSize = 0;
-
-void* Node::operator new(size_t s) throw()
-{
- nodesSize += s;
- return ::operator new(s);
-}
-
-void Node::operator delete(void* ptr, size_t s)
-{
- nodesSize -= s;
- ::operator delete(ptr);
-}
-
-size_t Node::reportJavaScriptNodesSize()
-{
- return nodesSize;
-}
-#endif
-
} // namespace JSC
int lineNo() const { return m_line; }
-#ifdef ANDROID_INSTRUMENT
- // Overridden to prevent the normal new from being called.
- void* operator new(size_t) throw();
-
- // Overridden to prevent the normal delete from being called.
- void operator delete(void*, size_t);
-
- static size_t reportJavaScriptNodesSize();
-#endif
-
protected:
int m_line;
};
using namespace WebCore;
using namespace WTF;
+using namespace JSC;
namespace android {
Heap::Statistics jsHeapStatistics = JSDOMWindow::commonJSGlobalData()->heap.statistics();
LOGD("Current JavaScript heap size is %d and has %d bytes free",
jsHeapStatistics.size, jsHeapStatistics.free);
- LOGD("Current JavaScript nodes use %d bytes", JSC::Node::reportJavaScriptNodesSize());
#endif
LOGD("Current CSS styles use %d bytes", StyleBase::reportStyleSize());
LOGD("Current DOM nodes use %d bytes", WebCore::Node::reportDOMNodesSize());