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

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

Issue 1435273002: Fix name shown by devtools for subclasses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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-api.cc ('k') | test/mjsunit/regress/regress-crbug-523308.js » ('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 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));
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/regress/regress-crbug-523308.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698