Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/resources/observeGC.js |
| diff --git a/third_party/WebKit/LayoutTests/resources/observeGC.js b/third_party/WebKit/LayoutTests/resources/observeGC.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5fa36fffe53724dac60c6edf898dce45b639f3ee |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/resources/observeGC.js |
| @@ -0,0 +1,10 @@ |
| +// Returns a GCObservation object for the object returned by the |
|
rmcilroy
2016/05/13 11:21:08
Add copyright notice.
mythria
2016/05/16 09:27:57
As discussed offline. We don't need it here.
|
| +// getObjectToObserve function. This is intended to help in observing if a GC |
| +// has succesfully collected the object. When using interpreter (--ignition |
| +// flag), dead registers are not cleared. The object that is passed to observeGC |
| +// might be held in a dead register, preventing GC from collecting it. To avoid |
|
rmcilroy
2016/05/13 11:21:08
The "register" terminology is to technical to unde
mythria
2016/05/16 09:27:57
Done.
|
| +// this, a function that returns the object is passed as a parameter instead of |
| +// the object itself. Registers are released on function return. |
| +function observeGC(getObjectToObserve) { |
| + return internals.observeGC(getObjectToObserve()); |
| +} |