[webkit-reviews] review granted: [Bug 174695] Drop legacy SVGException type : [Attachment 316039] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 20 18:01:52 PDT 2017


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 174695: Drop legacy SVGException type
https://bugs.webkit.org/show_bug.cgi?id=174695

Attachment 316039: Patch

https://bugs.webkit.org/attachment.cgi?id=316039&action=review




--- Comment #6 from Darin Adler <darin at apple.com> ---
Comment on attachment 316039
  --> https://bugs.webkit.org/attachment.cgi?id=316039
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=316039&action=review

r=me assuming you can get everything to compile and all the tests to pass; not
sure why there are EWS failures

> Source/WebCore/bindings/js/JSExceptionBase.cpp:36
>  ExceptionBase* toExceptionBase(JSC::VM& vm, JSC::JSValue value)
>  {
> -    if (DOMCoreException* domException = JSDOMCoreException::toWrapped(vm,
value))
> -	   return reinterpret_cast<ExceptionBase*>(domException);
> -    if (SVGException* svgException = JSSVGException::toWrapped(vm, value))
> -	   return reinterpret_cast<ExceptionBase*>(svgException);
> -
> -    return nullptr;
> +    return
reinterpret_cast<ExceptionBase*>(JSDOMCoreException::toWrapped(vm, value));
>  }

Is this something you will be removing in a future patch?

> Source/WebCore/svg/SVGPathSegList.h:73
> +    ExceptionOr<RefPtr<SVGPathSeg>> initialize(Ref<SVGPathSeg>&& newItem)

Why RefPtr instead of Ref? The IDL file does not indicate a nullable return
type. I think this should use Ref for the return type. Probably just need to
add some releaseNonNull() to implementation in a few places.

> Source/WebCore/svg/SVGPathSegList.h:79
> +    ExceptionOr<RefPtr<SVGPathSeg>> getItem(unsigned index);

Ditto.

> Source/WebCore/svg/SVGPathSegList.h:81
> +    ExceptionOr<RefPtr<SVGPathSeg>> insertItemBefore(Ref<SVGPathSeg>&&
newItem, unsigned index)

Ditto.

> Source/WebCore/svg/SVGPathSegList.h:86
> +    ExceptionOr<RefPtr<SVGPathSeg>> replaceItem(Ref<SVGPathSeg>&&, unsigned
index);

Ditto.

> Source/WebCore/svg/SVGPathSegList.h:88
> +    ExceptionOr<RefPtr<SVGPathSeg>> removeItem(unsigned index);

Ditto.

> Source/WebCore/svg/SVGPathSegList.h:90
> +    ExceptionOr<RefPtr<SVGPathSeg>> appendItem(Ref<SVGPathSeg>&& newItem)

Ditto.


More information about the webkit-reviews mailing list