Pass reference instead of pointer to IDL attribute setters if not nullable
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 May 2016 04:21:19 +0000 (04:21 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 May 2016 04:21:19 +0000 (04:21 +0000)
commit52087db5557f3d00e15119b9ac412479db42f3a4
tree141ee633b849c1098fe4f73ce513947b84fd1278
parentb50da446e97502bb92c92a7fb72a0c5887a891de
Pass reference instead of pointer to IDL attribute setters if not nullable
https://bugs.webkit.org/show_bug.cgi?id=157250

Reviewed by Darin Adler.

Update the bindings generator so that we pass wrapper types by reference
to attribute setters instead of by raw pointer when the attribute is not
marked as nullable in the IDL.

There is no intended Web-exposed behavior change.

* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/ConvolverNode.idl:
* bindings/js/JSDataCueCustom.cpp:
(WebCore::constructJSDataCue):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):

* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
Rebaseline bindings tests.

* dom/Document.cpp:
(WebCore::Document::moveNodeIteratorsToNewDocument):
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::NodePointer::NodePointer):
(WebCore::NodeIterator::NodePointer::moveToNext):
(WebCore::NodeIterator::NodePointer::moveToPrevious):
(WebCore::NodeIterator::NodeIterator):
(WebCore::NodeIterator::~NodeIterator):
(WebCore::NodeIterator::updateForNodeRemoval):
(WebCore::NodeIterator::NodePointer::clear): Deleted.
(WebCore::NodeIterator::nextNode): Deleted.
* dom/NodeIterator.h:
* dom/Traversal.cpp:
(WebCore::NodeIteratorBase::NodeIteratorBase):
* dom/Traversal.h:
(WebCore::NodeIteratorBase::root):
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::setCurrentNode):
(WebCore::TreeWalker::setCurrent):
(WebCore::TreeWalker::parentNode):
(WebCore::TreeWalker::firstChild):
(WebCore::TreeWalker::lastChild):
(WebCore::TreeWalker::traverseSiblings):
(WebCore::TreeWalker::previousNode):
(WebCore::TreeWalker::nextNode):
* dom/TreeWalker.h:
(WebCore::TreeWalker::currentNode):
* dom/TreeWalker.idl:
* html/HTMLAttachmentElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLTableElement.idl:
* html/track/DataCue.cpp:
(WebCore::DataCue::DataCue):
(WebCore::DataCue::setData):
(WebCore::toDataCue): Deleted.
* html/track/DataCue.h:
* html/track/DataCue.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl
Source/WebCore/Modules/webaudio/ConvolverNode.idl
Source/WebCore/bindings/js/JSDataCueCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/NodeIterator.cpp
Source/WebCore/dom/NodeIterator.h
Source/WebCore/dom/Traversal.cpp
Source/WebCore/dom/Traversal.h
Source/WebCore/dom/TreeWalker.cpp
Source/WebCore/dom/TreeWalker.h
Source/WebCore/dom/TreeWalker.idl
Source/WebCore/html/HTMLAttachmentElement.idl
Source/WebCore/html/HTMLInputElement.idl
Source/WebCore/html/HTMLTableElement.idl
Source/WebCore/html/track/DataCue.cpp
Source/WebCore/html/track/DataCue.h
Source/WebCore/html/track/DataCue.idl