| 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 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 static MaybeHandle<String> EncodeUri(Isolate* isolate, Handle<String> uri) { | 28 static MaybeHandle<String> EncodeUri(Isolate* isolate, Handle<String> uri) { |
| 29 return Encode(isolate, uri, true); | 29 return Encode(isolate, uri, true); |
| 30 } | 30 } |
| 31 | 31 |
| 32 // ES6 section 18.2.6.5 encodeURIComponenet (uriComponent) | 32 // ES6 section 18.2.6.5 encodeURIComponenet (uriComponent) |
| 33 static MaybeHandle<String> EncodeUriComponent(Isolate* isolate, | 33 static MaybeHandle<String> EncodeUriComponent(Isolate* isolate, |
| 34 Handle<String> component) { | 34 Handle<String> component) { |
| 35 return Encode(isolate, component, false); | 35 return Encode(isolate, component, false); |
| 36 } | 36 } |
| 37 | 37 |
| 38 // ES6 section B.2.1.1 escape (string) |
| 39 static MaybeHandle<String> Escape(Isolate* isolate, Handle<String> string); |
| 40 |
| 41 // ES6 section B.2.1.2 unescape (string) |
| 42 static MaybeHandle<String> Unescape(Isolate* isolate, Handle<String> string); |
| 43 |
| 38 private: | 44 private: |
| 39 static MaybeHandle<String> Decode(Isolate* isolate, Handle<String> uri, | 45 static MaybeHandle<String> Decode(Isolate* isolate, Handle<String> uri, |
| 40 bool is_uri); | 46 bool is_uri); |
| 41 static MaybeHandle<String> Encode(Isolate* isolate, Handle<String> uri, | 47 static MaybeHandle<String> Encode(Isolate* isolate, Handle<String> uri, |
| 42 bool is_uri); | 48 bool is_uri); |
| 43 }; | 49 }; |
| 44 | 50 |
| 45 } // namespace internal | 51 } // namespace internal |
| 46 } // namespace v8 | 52 } // namespace v8 |
| 47 | 53 |
| 48 #endif // V8_URI_H_ | 54 #endif // V8_URI_H_ |
| OLD | NEW |