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

Side by Side Diff: src/builtins/builtins-error.cc

Issue 2422573002: [builtins] Remove template argument from args.target(). (Closed)
Patch Set: Created 4 years, 2 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/builtins/builtins-date.cc ('k') | src/builtins/builtins-function.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/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/messages.h" 8 #include "src/messages.h"
9 #include "src/property-descriptor.h" 9 #include "src/property-descriptor.h"
10 #include "src/string-builder.h" 10 #include "src/string-builder.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // When we're passed a JSFunction as new target, we can skip frames until that 22 // When we're passed a JSFunction as new target, we can skip frames until that
23 // specific function is seen instead of unconditionally skipping the first 23 // specific function is seen instead of unconditionally skipping the first
24 // frame. 24 // frame.
25 if (args.new_target()->IsJSFunction()) { 25 if (args.new_target()->IsJSFunction()) {
26 mode = SKIP_UNTIL_SEEN; 26 mode = SKIP_UNTIL_SEEN;
27 caller = args.new_target(); 27 caller = args.new_target();
28 } 28 }
29 29
30 RETURN_RESULT_OR_FAILURE( 30 RETURN_RESULT_OR_FAILURE(
31 isolate, ErrorUtils::Construct(isolate, args.target<JSFunction>(), 31 isolate, ErrorUtils::Construct(isolate, args.target(),
32 Handle<Object>::cast(args.new_target()), 32 Handle<Object>::cast(args.new_target()),
33 args.atOrUndefined(isolate, 1), mode, 33 args.atOrUndefined(isolate, 1), mode,
34 caller, false)); 34 caller, false));
35 } 35 }
36 36
37 // static 37 // static
38 BUILTIN(ErrorCaptureStackTrace) { 38 BUILTIN(ErrorCaptureStackTrace) {
39 HandleScope scope(isolate); 39 HandleScope scope(isolate);
40 Handle<Object> object_obj = args.atOrUndefined(isolate, 1); 40 Handle<Object> object_obj = args.atOrUndefined(isolate, 1);
41 if (!object_obj->IsJSObject()) { 41 if (!object_obj->IsJSObject()) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 Handle<Object> undefined = isolate->factory()->undefined_value(); 126 Handle<Object> undefined = isolate->factory()->undefined_value();
127 const int template_index = MessageTemplate::kURIMalformed; 127 const int template_index = MessageTemplate::kURIMalformed;
128 RETURN_RESULT_OR_FAILURE( 128 RETURN_RESULT_OR_FAILURE(
129 isolate, 129 isolate,
130 ErrorUtils::MakeGenericError(isolate, constructor, template_index, 130 ErrorUtils::MakeGenericError(isolate, constructor, template_index,
131 undefined, undefined, undefined, SKIP_NONE)); 131 undefined, undefined, undefined, SKIP_NONE));
132 } 132 }
133 133
134 } // namespace internal 134 } // namespace internal
135 } // namespace v8 135 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-date.cc ('k') | src/builtins/builtins-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698