Commit 701b3171 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by Commit Bot

Make %GetUndetectable()'s [[Call]] return null

%GetUndetectable() is used for testing document.all's wacky "emulates
undefined" behavior both in mjsunit tests and in test262. mjsunit
doesn't rely its [[Call]] behavior, while test262 relies on its [[Call]]
returning null [1]. So, make it return null.

[1] https://github.com/tc39/test262/blob/master/INTERPRETING.md search
for IsHTMLDDA

Bug: v8:7184
Change-Id: I93d15715303deb0a932545d919bc281f5f4d5829
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2181475
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67555}
parent ff2c36d4
......@@ -588,8 +588,8 @@ RUNTIME_FUNCTION(Runtime_UnblockConcurrentRecompilation) {
return ReadOnlyRoots(isolate).undefined_value();
}
static void ReturnThis(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(args.This());
static void ReturnNull(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().SetNull();
}
RUNTIME_FUNCTION(Runtime_GetUndetectable) {
......@@ -598,7 +598,7 @@ RUNTIME_FUNCTION(Runtime_GetUndetectable) {
v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
Local<v8::ObjectTemplate> desc = v8::ObjectTemplate::New(v8_isolate);
desc->MarkAsUndetectable();
desc->SetCallAsFunctionHandler(ReturnThis);
desc->SetCallAsFunctionHandler(ReturnNull);
Local<v8::Object> obj =
desc->NewInstance(v8_isolate->GetCurrentContext()).ToLocalChecked();
return *Utils::OpenHandle(*obj);
......
......@@ -445,7 +445,7 @@
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments': [FAIL_SLOPPY],
# https://bugs.chromium.org/p/v8/issues/detail?id=7184
'annexB/language/expressions/yield/star-iterable-return-emulates-undefined-throws-when-called': [FAIL],
'annexB/language/expressions/yield/star-iterable-throw-emulates-undefined-throws-when-called': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=5690
'language/expressions/call/eval-spread': [FAIL],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment