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

Unified Diff: test/cctest/test-api.cc

Issue 1749353004: Ship ES2015 Function.name reform (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 10 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 | « src/flag-definitions.h ('k') | test/mjsunit/debug-backtrace.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index b0d80ed49a7d9a2da309aaa969e736a4ead97a83..5668a2585f885d8745ec36b887adf8e3f2f77b47 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -13521,7 +13521,7 @@ THREADED_TEST(ObjectGetConstructorName) {
"function Child() {};"
"Child.prototype = new Parent();"
"Child.prototype.constructor = Child;"
- "var outer = { inner: function() { } };"
+ "var outer = { inner: (0, function() { }) };"
"var p = new Parent();"
"var c = new Child();"
"var x = new outer.inner();"
@@ -18377,6 +18377,7 @@ THREADED_TEST(FunctionGetInferredName) {
THREADED_TEST(FunctionGetDebugName) {
+ i::FLAG_harmony_function_name = true;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
const char* code =
@@ -18420,7 +18421,8 @@ THREADED_TEST(FunctionGetDebugName) {
"Object.defineProperty(i, 'name', { value: 'function.name' });"
"var j = function() {};"
"Object.defineProperty(j, 'name', { value: 'function.name' });"
- "var foo = { bar : { baz : function() {}}}; var k = foo.bar.baz;";
+ "var foo = { bar : { baz : (0, function() {})}}; var k = foo.bar.baz;"
+ "var foo = { bar : { baz : function() {} }}; var l = foo.bar.baz;";
v8::ScriptOrigin origin = v8::ScriptOrigin(v8_str("test"));
v8::Script::Compile(env.local(), v8_str(code), &origin)
.ToLocalChecked()
@@ -18439,7 +18441,8 @@ THREADED_TEST(FunctionGetDebugName) {
"h", "displayName",
"i", "function.name",
"j", "function.name",
- "k", "foo.bar.baz"};
+ "k", "foo.bar.baz",
+ "l", "baz"};
for (size_t i = 0; i < sizeof(functions) / sizeof(functions[0]) / 2; ++i) {
v8::Local<v8::Function> f = v8::Local<v8::Function>::Cast(
env->Global()
« no previous file with comments | « src/flag-definitions.h ('k') | test/mjsunit/debug-backtrace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698