Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: src/uri.h

Issue 2027003002: [builtins] Migrate escape/unescape from uri.js to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Minor refactoring Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-uri.cc ('k') | src/uri.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « src/runtime/runtime-uri.cc ('k') | src/uri.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698