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

Unified Diff: test/cctest/test-heap.cc

Issue 1411653002: Install iterator meta objects via utils object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 5 years, 2 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
« no previous file with comments | « src/js/v8natives.js ('k') | test/mjsunit/builtins.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 8b86544ccbe52577b3871601671ec1c44ccc24bf..cef8c3f25031b272c2400be433c2a3e1e9d7a479 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -5884,7 +5884,9 @@ static void UtilsHasBeenCollected(
TEST(BootstrappingExports) {
- FLAG_expose_natives_as = "natives";
+ // Expose utils object and delete it to observe that it is indeed
+ // being garbage-collected.
+ FLAG_expose_natives_as = "utils";
CcTest::InitializeVM();
v8::Isolate* isolate = CcTest::isolate();
@@ -5896,10 +5898,9 @@ TEST(BootstrappingExports) {
{
v8::HandleScope scope(isolate);
- v8::Handle<v8::Object> natives =
- CcTest::global()->Get(v8_str("natives"))->ToObject(isolate);
- utils.Reset(isolate, natives->Get(v8_str("utils"))->ToObject(isolate));
- natives->Delete(v8_str("utils"));
+ v8::Local<v8::String> name = v8_str("utils");
+ utils.Reset(isolate, CcTest::global()->Get(name)->ToObject(isolate));
+ CcTest::global()->Delete(name);
}
utils.SetWeak(&utils, UtilsHasBeenCollected,
« no previous file with comments | « src/js/v8natives.js ('k') | test/mjsunit/builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698