Completes native binding descriptors with native getters and potentially setters.
authormmirman@apple.com <mmirman@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2015 23:36:57 +0000 (23:36 +0000)
committermmirman@apple.com <mmirman@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2015 23:36:57 +0000 (23:36 +0000)
commite97f4ebd566c1c6c0cde015c59070e1dad5b4bc5
tree2b23791f8b8aee46976624ab6b0631b0ecf54090
parent4ca90e58538b495b2e9a4a0701ddf688bf28eb8f
Completes native binding descriptors with native getters and potentially setters.
https://bugs.webkit.org/show_bug.cgi?id=140575
rdar://problem/19506502

Reviewed by Mark Lam.

Source/JavaScriptCore:

* CMakeLists.txt:  Added JSBoundSlotBaseFunction.cpp
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/InjectedScriptSource.js: Added case for descriptor having a native getter.
* runtime/JSBoundSlotBaseFunction.cpp: Added.
(JSC::boundSlotBaseFunctionCall):
(JSC::JSBoundSlotBaseFunction::JSBoundSlotBaseFunction):
Necessary wrapper for custom getters and setters as objects.
(JSC::JSBoundSlotBaseFunction::create):
(JSC::JSBoundSlotBaseFunction::visitChildren):
(JSC::JSBoundSlotBaseFunction::finishCreation):
* runtime/JSBoundSlotBaseFunction.h: Added.
(JSC::JSBoundSlotBaseFunction::createStructure):
(JSC::JSBoundSlotBaseFunction::boundSlotBase):
(JSC::JSBoundSlotBaseFunction::customGetterSetter):
(JSC::JSBoundSlotBaseFunction::isGetter):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Added a globally initialized structure for JSBoundSlotBaseFunction
(JSC::JSGlobalObject::visitChildren): visits that structure
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::boundSlotBaseFunctionStructure): added a getter for that structure
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor): extends the case for CustomGetterSetter to
actually include GetterSetter as a JSBoundSlotBaseFunction
* runtime/VM.cpp: Added initializer for customGetterSetterFunctionMap
* runtime/VM.h: Added cache for JSBoundSlotBaseFunction

LayoutTests:

* inspector-protocol/runtime/getProperties-expected.txt: updated.
* js/dom/native-bindings-descriptors-expected.txt: Added.
* js/dom/native-bindings-descriptors.html: Added.
* js/dom/script-tests/native-bindings-descriptors.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector-protocol/runtime/getProperties-expected.txt
LayoutTests/js/dom/native-bindings-descriptors-expected.txt [new file with mode: 0644]
LayoutTests/js/dom/native-bindings-descriptors.html [new file with mode: 0644]
LayoutTests/js/dom/script-tests/native-bindings-descriptors.js [new file with mode: 0644]
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/inspector/InjectedScriptSource.js
Source/JavaScriptCore/runtime/JSBoundSlotBaseFunction.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSBoundSlotBaseFunction.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSObject.cpp
Source/JavaScriptCore/runtime/VM.cpp
Source/JavaScriptCore/runtime/VM.h