Skip to content

Commit

Permalink
Bug 1831044 - Remove redundant *Throws attributes in URL r=webidl,smaug
Browse files Browse the repository at this point in the history
D34766 removed the usages by not using URLWorker on those methods.

Differential Revision: https://phabricator.services.mozilla.com/D176989
  • Loading branch information
saschanaz committed May 3, 2023
1 parent fa6606c commit 4612d82
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dom/url/URL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void URL::SetHref(const nsAString& aHref, ErrorResult& aRv) {
UpdateURLSearchParams();
}

void URL::GetOrigin(nsAString& aOrigin, ErrorResult& aRv) const {
void URL::GetOrigin(nsAString& aOrigin) const {
nsresult rv = nsContentUtils::GetUTFOrigin(URI(), aOrigin);
if (NS_WARN_IF(NS_FAILED(rv))) {
aOrigin.Truncate();
Expand All @@ -202,7 +202,7 @@ void URL::GetProtocol(nsAString& aProtocol) const {
aProtocol.Append(char16_t(':'));
}

void URL::SetProtocol(const nsAString& aProtocol, ErrorResult& aRv) {
void URL::SetProtocol(const nsAString& aProtocol) {
nsAString::const_iterator start;
aProtocol.BeginReading(start);

Expand Down
4 changes: 2 additions & 2 deletions dom/url/URL.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class URL final : public URLSearchParamsObserver, public nsWrapperCache {

void SetHref(const nsAString& aHref, ErrorResult& aRv);

void GetOrigin(nsAString& aOrigin, ErrorResult& aRv) const;
void GetOrigin(nsAString& aOrigin) const;

void GetProtocol(nsAString& aProtocol) const;

void SetProtocol(const nsAString& aProtocol, ErrorResult& aRv);
void SetProtocol(const nsAString& aProtocol);

void GetUsername(nsAString& aUsername) const;

Expand Down
4 changes: 1 addition & 3 deletions dom/webidl/URL.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The origins of this IDL file are
* http://url.spec.whatwg.org/#api
* http://dev.w3.org/2006/webapi/FileAPI/#creating-revoking
* https://w3c.github.io/FileAPI/#creating-revoking
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
Expand All @@ -21,9 +21,7 @@ interface URL {

[SetterThrows]
stringifier attribute USVString href;
[GetterThrows]
readonly attribute USVString origin;
[SetterThrows]
attribute USVString protocol;
attribute USVString username;
attribute USVString password;
Expand Down

0 comments on commit 4612d82

Please sign in to comment.