| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_URI_H_ | 5 #ifndef V8_URI_H_ |
| 6 #define V8_URI_H_ | 6 #define V8_URI_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 class Uri : public AllStatic { | 14 class Uri : public AllStatic { |
| 15 public: | 15 public: |
| 16 static Object* EncodeUri(Isolate* isolate, Handle<String> uri) { | 16 static MaybeHandle<String> EncodeUri(Isolate* isolate, Handle<String> uri) { |
| 17 return Encode(isolate, uri, true); | 17 return Encode(isolate, uri, true); |
| 18 } | 18 } |
| 19 | 19 |
| 20 static Object* EncodeUriComponent(Isolate* isolate, | 20 static MaybeHandle<String> EncodeUriComponent(Isolate* isolate, |
| 21 Handle<String> component) { | 21 Handle<String> component) { |
| 22 return Encode(isolate, component, false); | 22 return Encode(isolate, component, false); |
| 23 } | 23 } |
| 24 | 24 |
| 25 // DecodeUri | 25 // DecodeUri |
| 26 // DecodeUriComponent | 26 // DecodeUriComponent |
| 27 // escape | 27 // escape |
| 28 // unescape | 28 // unescape |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 static Object* Encode(Isolate* isolate, Handle<String> uri, bool is_uri); | 31 static MaybeHandle<String> Encode(Isolate* isolate, Handle<String> uri, |
| 32 bool is_uri); |
| 32 // decode | 33 // decode |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace internal | 36 } // namespace internal |
| 36 } // namespace v8 | 37 } // namespace v8 |
| 37 | 38 |
| 38 #endif // V8_URI_H_ | 39 #endif // V8_URI_H_ |
| OLD | NEW |