Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: third_party/WebKit/LayoutTests/resources/observeGC.js

Issue 1950613005: Fixes tests that use internals.observeGC to work with Ignition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes comments and fixes more tests. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
+}

Powered by Google App Engine
This is Rietveld 408576698