Loading cnn.com in MiniBrowser hits Structure::dump() under DFG::AdaptiveInferredProp...
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jun 2018 01:46:29 +0000 (01:46 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jun 2018 01:46:29 +0000 (01:46 +0000)
commitc1b0db713fe8f1a043ebf822f556820c3ba09fbf
tree8fe476465b3b6bae4ca978adaf1696a0429a2442
parent1a167d7ff326569fe2dda1a93ddee99b8f1ccd59
Loading cnn.com in MiniBrowser hits Structure::dump() under DFG::AdaptiveInferredPropertyValueWatchpoint::handleFire  which churns 65KB of memory
https://bugs.webkit.org/show_bug.cgi?id=186467

Reviewed by Simon Fraser.

This patch adds a LazyFireDetail that wraps ScopedLambda so that
we don't actually malloc any strings for firing unless those
Strings are actually going to be printed.

* bytecode/Watchpoint.h:
(JSC::LazyFireDetail::LazyFireDetail):
* dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp:
(JSC::DFG::AdaptiveInferredPropertyValueWatchpoint::handleFire):
* dfg/DFGAdaptiveStructureWatchpoint.cpp:
(JSC::DFG::AdaptiveStructureWatchpoint::fireInternal):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/Watchpoint.h
Source/JavaScriptCore/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp
Source/JavaScriptCore/dfg/DFGAdaptiveStructureWatchpoint.cpp
Source/JavaScriptCore/runtime/ArrayPrototype.cpp