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

Unified Diff: src/json-parser.h

Issue 7480044: Ensure that a string is flattened when entering JsonParser::ParseJson. Fixes issue v8:1572. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-parser.h
diff --git a/src/json-parser.h b/src/json-parser.h
index 3ef5afbb895f403bad7e007342fdaaf6a78ea8b4..f93b04d38ffe520f0a1615b51a9efcf3c5cf21ef 100644
--- a/src/json-parser.h
+++ b/src/json-parser.h
@@ -166,7 +166,8 @@ class JsonParser BASE_EMBEDDED {
template <bool seq_ascii>
Handle<Object> JsonParser<seq_ascii>::ParseJson(Handle<String> source) {
isolate_ = source->map()->isolate();
- source_ = Handle<String>(source->TryFlattenGetString());
+ FlattenString(source);
+ source_ = source;
source_length_ = source_->length();
// Optimized fast case where we only have ASCII characters.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698