| Index: test/cctest/test-heap-profiler.cc
|
| diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
|
| index a5973c757820bff5a5eb4e5e2ed7808b3958fa20..faa418f4ac4aa6fed7469aa62667c7d9f5ef8b70 100644
|
| --- a/test/cctest/test-heap-profiler.cc
|
| +++ b/test/cctest/test-heap-profiler.cc
|
| @@ -1818,11 +1818,11 @@ TEST(GetConstructorName) {
|
| "var Constructor2 = function() {};\n"
|
| "var obj2 = new Constructor2();\n"
|
| "var obj3 = {};\n"
|
| - "obj3.constructor = function Constructor3() {};\n"
|
| + "obj3.__proto__ = { constructor: function Constructor3() {} };\n"
|
| "var obj4 = {};\n"
|
| "// Slow properties\n"
|
| "for (var i=0; i<2000; ++i) obj4[\"p\" + i] = i;\n"
|
| - "obj4.constructor = function Constructor4() {};\n"
|
| + "obj4.__proto__ = { constructor: function Constructor4() {} };\n"
|
| "var obj5 = {};\n"
|
| "var obj6 = {};\n"
|
| "obj6.constructor = 6;");
|
| @@ -1841,17 +1841,13 @@ TEST(GetConstructorName) {
|
| v8::Local<v8::Object> obj3 = js_global->Get(v8_str("obj3")).As<v8::Object>();
|
| i::Handle<i::JSObject> js_obj3 =
|
| i::Handle<i::JSObject>::cast(v8::Utils::OpenHandle(*obj3));
|
| - // TODO(verwaest): Restore to Constructor3 once supported by the
|
| - // heap-snapshot-generator.
|
| - CHECK_EQ(
|
| - 0, StringCmp("Object", i::V8HeapExplorer::GetConstructorName(*js_obj3)));
|
| + CHECK_EQ(0, StringCmp("Constructor3",
|
| + i::V8HeapExplorer::GetConstructorName(*js_obj3)));
|
| v8::Local<v8::Object> obj4 = js_global->Get(v8_str("obj4")).As<v8::Object>();
|
| i::Handle<i::JSObject> js_obj4 =
|
| i::Handle<i::JSObject>::cast(v8::Utils::OpenHandle(*obj4));
|
| - // TODO(verwaest): Restore to Constructor4 once supported by the
|
| - // heap-snapshot-generator.
|
| - CHECK_EQ(
|
| - 0, StringCmp("Object", i::V8HeapExplorer::GetConstructorName(*js_obj4)));
|
| + CHECK_EQ(0, StringCmp("Constructor4",
|
| + i::V8HeapExplorer::GetConstructorName(*js_obj4)));
|
| v8::Local<v8::Object> obj5 = js_global->Get(v8_str("obj5")).As<v8::Object>();
|
| i::Handle<i::JSObject> js_obj5 =
|
| i::Handle<i::JSObject>::cast(v8::Utils::OpenHandle(*obj5));
|
|
|