Ignore:
Timestamp:
Aug 31, 2017, 11:40:55 PM (8 years ago)
Author:
Yusuke Suzuki
Message:

[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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp

    r217525 r221475  
    4242}
    4343
    44 void InternalFunction::finishCreation(VM& vm, const String& name)
     44void InternalFunction::finishCreation(VM& vm, const String& name, NameVisibility nameVisibility)
    4545{
    4646    Base::finishCreation(vm);
     
    4949    JSString* nameString = jsString(&vm, name);
    5050    m_originalName.set(vm, this, nameString);
    51     putDirect(vm, vm.propertyNames->name, nameString, ReadOnly | DontEnum);
     51    if (nameVisibility == NameVisibility::Visible)
     52        putDirect(vm, vm.propertyNames->name, nameString, ReadOnly | DontEnum);
    5253}
    5354
Note: See TracChangeset for help on using the changeset viewer.