Chromium Code Reviews| Index: src/builtins.cc |
| diff --git a/src/builtins.cc b/src/builtins.cc |
| index 30ec45199aa0a8bcc6465b251ceeff746003672a..7cab2adabd77cb983e7ccbb9dd24f554fd4a2ebf 100644 |
| --- a/src/builtins.cc |
| +++ b/src/builtins.cc |
| @@ -2103,13 +2103,32 @@ BUILTIN(ObjectSeal) { |
| return *object; |
| } |
| +// ES6 section 18.2.6.2 decodeURI (encodedURI) |
| +BUILTIN(GlobalDecodeURI) { |
| + HandleScope scope(isolate); |
| + Handle<String> encodedURI; |
|
Benedikt Meurer
2016/05/21 19:27:59
Nit: Please rename to encoded_uri.
Franzi
2016/05/22 12:34:08
Done.
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| + isolate, encodedURI, |
| + Object::ToString(isolate, args.atOrUndefined(isolate, 1))); |
| + return Uri::DecodeUri(isolate, encodedURI); |
| +} |
| + |
| +// ES6 section 18.2.6.3 decodeURIComponent (encodedURIComponent) |
| +BUILTIN(GlobalDecodeURIComponent) { |
| + HandleScope scope(isolate); |
| + Handle<String> encodedURIComponent; |
|
Benedikt Meurer
2016/05/21 19:27:59
Nit: Please rename to encoded_uri_component.
Franzi
2016/05/22 12:34:08
Done. Changed it in encodeURIComponent as well.
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| + isolate, encodedURIComponent, |
| + Object::ToString(isolate, args.atOrUndefined(isolate, 1))); |
| + return Uri::DecodeUriComponent(isolate, encodedURIComponent); |
| +} |
| + |
| // ES6 section 18.2.6.4 encodeURI (uri) |
| BUILTIN(GlobalEncodeURI) { |
| HandleScope scope(isolate); |
| Handle<String> uri; |
| ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| isolate, uri, Object::ToString(isolate, args.atOrUndefined(isolate, 1))); |
| - |
| return Uri::EncodeUri(isolate, uri); |
| } |
| @@ -2120,7 +2139,6 @@ BUILTIN(GlobalEncodeURIComponent) { |
| ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| isolate, uriComponent, |
| Object::ToString(isolate, args.atOrUndefined(isolate, 1))); |
| - |
| return Uri::EncodeUriComponent(isolate, uriComponent); |
| } |