Reviewers: ulan,
Description:
Don't access stack-allocated variable when it is out of scope. Enable
Isolate
cleanup in cctests again.
Please review this at https://codereview.chromium.org/146973005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+3, -5 lines):
M test/cctest/cctest.h
M test/cctest/test-api.cc
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index
6c67dd52ec4094d7e6805266879e1d92b3f20cfb..d9f76294e1a5d432db4b2fdf9127d39630a02e00
100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -131,8 +131,7 @@ class CcTest {
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:
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index
2ff92ea8c4d4d9c5ec9bb6ce477e737e3a7a1dd1..f473f5ccb2b64d4d3be0cad4817077bcf493bd57
100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -737,14 +737,13 @@ TEST(MakingExternalUnalignedAsciiString) {
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.