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

Side by Side Diff: src/regexp/regexp-parser.cc

Issue 2759513002: Remove Factory::NewStringFromASCII method. (Closed)
Patch Set: Created 3 years, 9 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/factory.h ('k') | src/wasm/wasm-objects.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 #include "src/regexp/regexp-parser.h" 5 #include "src/regexp/regexp-parser.h"
6 6
7 #include "src/char-predicates-inl.h" 7 #include "src/char-predicates-inl.h"
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 default: 129 default:
130 break; 130 break;
131 } 131 }
132 return false; 132 return false;
133 } 133 }
134 134
135 135
136 RegExpTree* RegExpParser::ReportError(Vector<const char> message) { 136 RegExpTree* RegExpParser::ReportError(Vector<const char> message) {
137 if (failed_) return NULL; // Do not overwrite any existing error. 137 if (failed_) return NULL; // Do not overwrite any existing error.
138 failed_ = true; 138 failed_ = true;
139 *error_ = isolate()->factory()->NewStringFromAscii(message).ToHandleChecked(); 139 *error_ = isolate()
140 ->factory()
141 ->NewStringFromOneByte(Vector<const uint8_t>::cast(message))
142 .ToHandleChecked();
140 // Zip to the end to make sure the no more input is read. 143 // Zip to the end to make sure the no more input is read.
141 current_ = kEndMarker; 144 current_ = kEndMarker;
142 next_pos_ = in()->length(); 145 next_pos_ = in()->length();
143 return NULL; 146 return NULL;
144 } 147 }
145 148
146 149
147 #define CHECK_FAILED /**/); \ 150 #define CHECK_FAILED /**/); \
148 if (failed_) return NULL; \ 151 if (failed_) return NULL; \
149 ((void)0 152 ((void)0
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 return false; 1804 return false;
1802 } 1805 }
1803 terms_.Add(new (zone()) RegExpQuantifier(min, max, quantifier_type, atom), 1806 terms_.Add(new (zone()) RegExpQuantifier(min, max, quantifier_type, atom),
1804 zone()); 1807 zone());
1805 LAST(ADD_TERM); 1808 LAST(ADD_TERM);
1806 return true; 1809 return true;
1807 } 1810 }
1808 1811
1809 } // namespace internal 1812 } // namespace internal
1810 } // namespace v8 1813 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698