@@ -24362,12 +24362,13 @@ TEST(GetOwnPropertyDescriptor) {
2436224362 v8::Isolate* isolate = env->GetIsolate();
2436324363 v8::HandleScope scope(isolate);
2436424364 CompileRun(
24365- "var x = { value : 13};"
24366- "Object.defineProperty(x, 'p0', {value : 12});"
24367- "Object.defineProperty(x, 'p1', {"
24368- " set : function(value) { this.value = value; },"
24369- " get : function() { return this.value; },"
24370- "});");
24365+ "var x = { value : 13};"
24366+ "Object.defineProperty(x, 'p0', {value : 12});"
24367+ "Object.defineProperty(x, Symbol.toStringTag, {value: 'foo'});"
24368+ "Object.defineProperty(x, 'p1', {"
24369+ " set : function(value) { this.value = value; },"
24370+ " get : function() { return this.value; },"
24371+ "});");
2437124372 Local<Object> x = Local<Object>::Cast(
2437224373 env->Global()->Get(env.local(), v8_str("x")).ToLocalChecked());
2437324374 Local<Value> desc =
@@ -24401,6 +24402,14 @@ TEST(GetOwnPropertyDescriptor) {
2440124402 ->Equals(env.local(),
2440224403 get->Call(env.local(), x, 0, NULL).ToLocalChecked())
2440324404 .FromJust());
24405+ desc =
24406+ x->GetOwnPropertyDescriptor(env.local(), Symbol::GetToStringTag(isolate))
24407+ .ToLocalChecked();
24408+ CHECK(v8_str("foo")
24409+ ->Equals(env.local(), Local<Object>::Cast(desc)
24410+ ->Get(env.local(), v8_str("value"))
24411+ .ToLocalChecked())
24412+ .FromJust());
2440424413}
2440524414
2440624415
0 commit comments