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

Unified Diff: src/json-stringifier.h

Issue 2006663002: [json] implement JSON.stringify gap pre-processing in C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@jsonrefactor
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index 93709e6967349bb6ff4b6e57b2a71fbd0de26574..36697828745fc1f31ec7228fb245d570eaa0cea6 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -13,11 +13,12 @@ namespace internal {
class BasicJsonStringifier BASE_EMBEDDED {
public:
- BasicJsonStringifier(Isolate* isolate, Handle<String> gap);
+ explicit BasicJsonStringifier(Isolate* isolate);
~BasicJsonStringifier() { DeleteArray(gap_); }
- MUST_USE_RESULT MaybeHandle<Object> Stringify(Handle<Object> object);
+ MUST_USE_RESULT MaybeHandle<Object> Stringify(Handle<Object> object,
+ Handle<Object> gap);
MUST_USE_RESULT static MaybeHandle<Object> StringifyString(
Isolate* isolate, Handle<String> object);
@@ -25,6 +26,8 @@ class BasicJsonStringifier BASE_EMBEDDED {
private:
enum Result { UNCHANGED, SUCCESS, EXCEPTION };
+ bool InitializeGap(Handle<Object> gap);
+
MUST_USE_RESULT MaybeHandle<Object> ApplyToJsonFunction(
Handle<Object> object,
Handle<Object> key);
@@ -104,7 +107,6 @@ class BasicJsonStringifier BASE_EMBEDDED {
IncrementalStringBuilder builder_;
Handle<String> tojson_string_;
Handle<JSArray> stack_;
- Handle<String> gap_string_;
uc16* gap_;
int indent_;
« no previous file with comments | « src/js/json.js ('k') | src/json-stringifier.cc » ('j') | src/json-stringifier.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698