Revision: 19068
Author: [email protected]
Date: Tue Feb 4 12:23:30 2014 UTC
Log: Don't access stack-allocated variable when it is out of scope.
Enable Isolate cleanup in cctests again.
[email protected]
Review URL: https://codereview.chromium.org/146973005
http://code.google.com/p/v8/source/detail?r=19068
Modified:
/branches/bleeding_edge/test/cctest/cctest.h
/branches/bleeding_edge/test/cctest/test-api.cc
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.h Tue Feb 4 09:41:21 2014
UTC
+++ /branches/bleeding_edge/test/cctest/cctest.h Tue Feb 4 12:23:30 2014
UTC
@@ -131,8 +131,7 @@
v8::Isolate* isolate = CcTest::isolate());
static void TearDown() {
- // TODO(svenpanne) Enable this when our cctests are fixed.
- // if (isolate_ != NULL) isolate_->Dispose();
+ if (isolate_ != NULL) isolate_->Dispose();
}
private:
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Mon Feb 3 07:29:23
2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-api.cc Tue Feb 4 12:23:30
2014 UTC
@@ -737,14 +737,13 @@
CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in old gen now
// Turn into external string with unaligned resource data.
- int dispose_count = 0;
const char* c_cons = "_abcdefghijklmnopqrstuvwxyz";
bool success = cons->MakeExternal(
- new TestAsciiResource(i::StrDup(c_cons), &dispose_count, 1));
+ new TestAsciiResource(i::StrDup(c_cons), NULL, 1));
CHECK(success);
const char* c_slice = "_bcdefghijklmnopqrstuvwxyz";
success = slice->MakeExternal(
- new TestAsciiResource(i::StrDup(c_slice), &dispose_count, 1));
+ new TestAsciiResource(i::StrDup(c_slice), NULL, 1));
CHECK(success);
// Trigger GCs and force evacuation.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.