| Index: test/cctest/interpreter/test-interpreter.cc
|
| diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
|
| index 49df43ce9582d9c647046fa66ea2ffa370128d2b..a7370a86489dd655a12dbba23cc0fb2366c0d370 100644
|
| --- a/test/cctest/interpreter/test-interpreter.cc
|
| +++ b/test/cctest/interpreter/test-interpreter.cc
|
| @@ -2885,6 +2885,20 @@ TEST(InterpreterSwitch) {
|
| }
|
| }
|
|
|
| +
|
| +TEST(InterpreterThisFunction) {
|
| + HandleAndZoneScope handles;
|
| + i::Isolate* isolate = handles.main_isolate();
|
| + i::Factory* factory = isolate->factory();
|
| +
|
| + InterpreterTester tester(handles.main_isolate(),
|
| + "var f;\n f = function f() { return f.name; }");
|
| + auto callable = tester.GetCallable<>();
|
| +
|
| + Handle<i::Object> return_value = callable().ToHandleChecked();
|
| + CHECK(return_value->SameValue(*factory->NewStringFromStaticChars("f")));
|
| +}
|
| +
|
| } // namespace interpreter
|
| } // namespace internal
|
| } // namespace v8
|
|
|