Bug 174695 - Drop legacy SVGException type
Summary: Drop legacy SVGException type
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 174677
  Show dependency treegraph
 
Reported: 2017-07-20 15:57 PDT by Chris Dumez
Modified: 2017-07-21 13:06 PDT (History)
8 users (show)

See Also:


Attachments
Patch (114.36 KB, patch)
2017-07-20 16:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-elcapitan (1.00 MB, application/zip)
2017-07-20 17:42 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (1.15 MB, application/zip)
2017-07-20 17:47 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews115 for mac-elcapitan (1.76 MB, application/zip)
2017-07-20 18:03 PDT, Build Bot
no flags Details
Patch (127.21 KB, patch)
2017-07-20 18:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-07-20 15:57:09 PDT
Drop legacy SVGException type. It is not longer part of the specification (replaced by DOMException). Both Firefox and Chrome no longer expose it.
Comment 1 Chris Dumez 2017-07-20 16:36:28 PDT
Created attachment 316039 [details]
Patch
Comment 2 Build Bot 2017-07-20 17:41:59 PDT
Comment on attachment 316039 [details]
Patch

Attachment 316039 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/4158183

New failing tests:
fast/dom/Window/window-lookup-precedence.html
Comment 3 Build Bot 2017-07-20 17:42:00 PDT
Created attachment 316048 [details]
Archive of layout-test-results from ews102 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 4 Build Bot 2017-07-20 17:47:44 PDT
Comment on attachment 316039 [details]
Patch

Attachment 316039 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4158187

New failing tests:
fast/dom/Window/window-lookup-precedence.html
Comment 5 Build Bot 2017-07-20 17:47:45 PDT
Created attachment 316050 [details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 6 Darin Adler 2017-07-20 18:01:52 PDT
Comment on attachment 316039 [details]
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.
Comment 7 Build Bot 2017-07-20 18:03:45 PDT
Comment on attachment 316039 [details]
Patch

Attachment 316039 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4158197

New failing tests:
fast/dom/Window/window-lookup-precedence.html
Comment 8 Build Bot 2017-07-20 18:03:49 PDT
Created attachment 316051 [details]
Archive of layout-test-results from ews115 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 9 Chris Dumez 2017-07-20 18:28:06 PDT
Comment on attachment 316039 [details]
Patch

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

>> Source/WebCore/bindings/js/JSExceptionBase.cpp:36
>>  }
> 
> Is this something you will be removing in a future patch?

Will see if this is a small enough change to drop in this patch. But yes, follow-up clean up is planned.

>> 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.

Will see if this is a small change to do in this patch.
Comment 10 Chris Dumez 2017-07-20 18:54:50 PDT
Comment on attachment 316039 [details]
Patch

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

>>> Source/WebCore/bindings/js/JSExceptionBase.cpp:36
>>>  }
>> 
>> Is this something you will be removing in a future patch?
> 
> Will see if this is a small enough change to drop in this patch. But yes, follow-up clean up is planned.

Dropped in the next iteration.

>>> 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.
> 
> Will see if this is a small change to do in this patch.

I can look into it for a follow up. This is a larger change because it requires modifying SVGListProperty and all its subclasses.
Comment 11 Chris Dumez 2017-07-20 18:55:14 PDT
Created attachment 316056 [details]
Patch
Comment 12 Chris Dumez 2017-07-20 19:36:57 PDT
Comment on attachment 316056 [details]
Patch

Clearing flags on attachment: 316056

Committed r219712: <http://trac.webkit.org/changeset/219712>
Comment 13 Chris Dumez 2017-07-20 19:37:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Darin Adler 2017-07-21 13:06:07 PDT
Comment on attachment 316056 [details]
Patch

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

> Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp:66
> +    if (auto* domException = JSDOMCoreException::toWrapped(vm, exception))
> +        return domException->toString();

I think I would have called this “unwrappedException” or "underlyingException".