@@ -24375,12 +24375,13 @@ TEST(GetOwnPropertyDescriptor) {
24375
24375
v8::Isolate* isolate = env->GetIsolate();
24376
24376
v8::HandleScope scope(isolate);
24377
24377
CompileRun(
24378
- "var x = { value : 13};"
24379
- "Object.defineProperty(x, 'p0', {value : 12});"
24380
- "Object.defineProperty(x, 'p1', {"
24381
- " set : function(value) { this.value = value; },"
24382
- " get : function() { return this.value; },"
24383
- "});");
24378
+ "var x = { value : 13};"
24379
+ "Object.defineProperty(x, 'p0', {value : 12});"
24380
+ "Object.defineProperty(x, Symbol.toStringTag, {value: 'foo'});"
24381
+ "Object.defineProperty(x, 'p1', {"
24382
+ " set : function(value) { this.value = value; },"
24383
+ " get : function() { return this.value; },"
24384
+ "});");
24384
24385
Local<Object> x = Local<Object>::Cast(
24385
24386
env->Global()->Get(env.local(), v8_str("x")).ToLocalChecked());
24386
24387
Local<Value> desc =
@@ -24414,6 +24415,14 @@ TEST(GetOwnPropertyDescriptor) {
24414
24415
->Equals(env.local(),
24415
24416
get->Call(env.local(), x, 0, NULL).ToLocalChecked())
24416
24417
.FromJust());
24418
+ desc =
24419
+ x->GetOwnPropertyDescriptor(env.local(), Symbol::GetToStringTag(isolate))
24420
+ .ToLocalChecked();
24421
+ CHECK(v8_str("foo")
24422
+ ->Equals(env.local(), Local<Object>::Cast(desc)
24423
+ ->Get(env.local(), v8_str("value"))
24424
+ .ToLocalChecked())
24425
+ .FromJust());
24417
24426
}
24418
24427
24419
24428
0 commit comments