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

Side by Side Diff: src/factory.cc

Issue 2357433002: Revert of [crankshaft] Protect against deopt loops from string length overflows. (Closed)
Patch Set: Created 4 years, 3 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/heap/heap.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 SKIP_NONE, no_caller, false); 1207 SKIP_NONE, no_caller, false);
1208 if (maybe_error.is_null()) { 1208 if (maybe_error.is_null()) {
1209 DCHECK(isolate()->has_pending_exception()); 1209 DCHECK(isolate()->has_pending_exception());
1210 maybe_error = handle(isolate()->pending_exception(), isolate()); 1210 maybe_error = handle(isolate()->pending_exception(), isolate());
1211 isolate()->clear_pending_exception(); 1211 isolate()->clear_pending_exception();
1212 } 1212 }
1213 1213
1214 return maybe_error.ToHandleChecked(); 1214 return maybe_error.ToHandleChecked();
1215 } 1215 }
1216 1216
1217 Handle<Object> Factory::NewInvalidStringLengthError() {
1218 // Invalidate the "string length" protector.
1219 if (isolate()->IsStringLengthOverflowIntact()) {
1220 isolate()->InvalidateStringLengthOverflowProtector();
1221 }
1222 return NewRangeError(MessageTemplate::kInvalidStringLength);
1223 }
1224 1217
1225 #define DEFINE_ERROR(NAME, name) \ 1218 #define DEFINE_ERROR(NAME, name) \
1226 Handle<Object> Factory::New##NAME(MessageTemplate::Template template_index, \ 1219 Handle<Object> Factory::New##NAME(MessageTemplate::Template template_index, \
1227 Handle<Object> arg0, Handle<Object> arg1, \ 1220 Handle<Object> arg0, Handle<Object> arg1, \
1228 Handle<Object> arg2) { \ 1221 Handle<Object> arg2) { \
1229 return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ 1222 return NewError(isolate()->name##_function(), template_index, arg0, arg1, \
1230 arg2); \ 1223 arg2); \
1231 } 1224 }
1232 DEFINE_ERROR(Error, error) 1225 DEFINE_ERROR(Error, error)
1233 DEFINE_ERROR(EvalError, eval_error) 1226 DEFINE_ERROR(EvalError, eval_error)
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2541 Handle<AccessorInfo> prototype = 2534 Handle<AccessorInfo> prototype =
2542 Accessors::FunctionPrototypeInfo(isolate(), attribs); 2535 Accessors::FunctionPrototypeInfo(isolate(), attribs);
2543 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2536 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2544 prototype, attribs); 2537 prototype, attribs);
2545 map->AppendDescriptor(&d); 2538 map->AppendDescriptor(&d);
2546 } 2539 }
2547 } 2540 }
2548 2541
2549 } // namespace internal 2542 } // namespace internal
2550 } // namespace v8 2543 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698