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

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

Issue 119753008: Revert r18451 "Revert r18449 "Reland r18383: More API cleanup." and r18450 "Unbreak build."" since … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 12 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 | « test/cctest/test-heap.cc ('k') | test/cctest/test-object-observe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 8943c5db7d1b14d3db793bbf82c6a26b86dcf4ac..61898312f0240c0392d8d4ff95b314f705ad910d 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -472,7 +472,7 @@ TEST(HeapSnapshotInternalReferences) {
v8::Handle<v8::Object> global_proxy = env->Global();
v8::Handle<v8::Object> global = global_proxy->GetPrototype().As<v8::Object>();
CHECK_EQ(2, global->InternalFieldCount());
- v8::Local<v8::Object> obj = v8::Object::New();
+ v8::Local<v8::Object> obj = v8::Object::New(isolate);
global->SetInternalField(0, v8_num(17));
global->SetInternalField(1, obj);
v8::HeapProfiler* heap_profiler = isolate->GetHeapProfiler();
@@ -1354,7 +1354,7 @@ class GraphWithImplicitRefs {
instance_ = this;
isolate_ = (*env)->GetIsolate();
for (int i = 0; i < kObjectsCount; i++) {
- objects_[i].Reset(isolate_, v8::Object::New());
+ objects_[i].Reset(isolate_, v8::Object::New(isolate_));
}
(*env)->Global()->Set(v8_str("root_object"),
v8::Local<v8::Value>::New(isolate_, objects_[0]));
@@ -1821,7 +1821,8 @@ TEST(WeakGlobalHandle) {
CHECK(!HasWeakGlobalHandle());
v8::Persistent<v8::Object>* handle =
- new v8::Persistent<v8::Object>(env->GetIsolate(), v8::Object::New());
+ new v8::Persistent<v8::Object>(env->GetIsolate(),
+ v8::Object::New(env->GetIsolate()));
handle->SetWeak(handle, PersistentHandleCallback);
CHECK(HasWeakGlobalHandle());
@@ -1995,8 +1996,9 @@ TEST(ManyLocalsInSharedContext) {
TEST(AllocationSitesAreVisible) {
LocalContext env;
- v8::HandleScope scope(env->GetIsolate());
- v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+ v8::Isolate* isolate = env->GetIsolate();
+ v8::HandleScope scope(isolate);
+ v8::HeapProfiler* heap_profiler = isolate->GetHeapProfiler();
CompileRun(
"fun = function () { var a = [3, 2, 1]; return a; }\n"
"fun();");
@@ -2039,9 +2041,12 @@ TEST(AllocationSitesAreVisible) {
v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(array_val);
// Verify the array is "a" in the code above.
CHECK_EQ(3, array->Length());
- CHECK_EQ(v8::Integer::New(3), array->Get(v8::Integer::New(0)));
- CHECK_EQ(v8::Integer::New(2), array->Get(v8::Integer::New(1)));
- CHECK_EQ(v8::Integer::New(1), array->Get(v8::Integer::New(2)));
+ CHECK_EQ(v8::Integer::New(isolate, 3),
+ array->Get(v8::Integer::New(isolate, 0)));
+ CHECK_EQ(v8::Integer::New(isolate, 2),
+ array->Get(v8::Integer::New(isolate, 1)));
+ CHECK_EQ(v8::Integer::New(isolate, 1),
+ array->Get(v8::Integer::New(isolate, 2)));
}
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/cctest/test-object-observe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698