[JSC] Fix "name" and "length" of Proxy revoke function
https://bugs.webkit.org/show_bug.cgi?id=176155
Reviewed by Mark Lam.
JSTests:
* test262.yaml:
Source/JavaScriptCore:
ProxyRevoke's length should be configurable. And it does not have
its own name. We add NameVisibility enum to InternalFunction to
control visibility of the name.
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::finishCreation):
* runtime/InternalFunction.h:
* runtime/ProxyRevoke.cpp:
(JSC::ProxyRevoke::finishCreation):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@221475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/runtime/InternalFunction.h b/Source/JavaScriptCore/runtime/InternalFunction.h
index 140daab..3a8f22e 100644
--- a/Source/JavaScriptCore/runtime/InternalFunction.h
+++ b/Source/JavaScriptCore/runtime/InternalFunction.h
@@ -52,7 +52,8 @@
protected:
JS_EXPORT_PRIVATE InternalFunction(VM&, Structure*);
- JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name);
+ enum class NameVisibility { Visible, Anonymous };
+ JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name, NameVisibility = NameVisibility::Visible);
JS_EXPORT_PRIVATE static Structure* createSubclassStructureSlow(ExecState*, JSValue newTarget, Structure*);