@@ -24362,12 +24362,13 @@ TEST(GetOwnPropertyDescriptor) {
24362
24362
v8::Isolate* isolate = env->GetIsolate();
24363
24363
v8::HandleScope scope(isolate);
24364
24364
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
+ "});");
24371
24372
Local<Object> x = Local<Object>::Cast(
24372
24373
env->Global()->Get(env.local(), v8_str("x")).ToLocalChecked());
24373
24374
Local<Value> desc =
@@ -24401,6 +24402,14 @@ TEST(GetOwnPropertyDescriptor) {
24401
24402
->Equals(env.local(),
24402
24403
get->Call(env.local(), x, 0, NULL).ToLocalChecked())
24403
24404
.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());
24404
24413
}
24405
24414
24406
24415
0 commit comments