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

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

Issue 2814043006: [errors] Improve NotGeneric error message (Closed)
Patch Set: Address comments Created 3 years, 8 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 | « no previous file | src/builtins/builtins-number.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-utils.h" 5 #include "src/builtins/builtins-utils.h"
6 #include "src/builtins/builtins.h" 6 #include "src/builtins/builtins.h"
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/counters.h" 10 #include "src/counters.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 HandleScope scope(isolate); 305 HandleScope scope(isolate);
306 Handle<Object> receiver = args.receiver(); 306 Handle<Object> receiver = args.receiver();
307 if (receiver->IsJSBoundFunction()) { 307 if (receiver->IsJSBoundFunction()) {
308 return *JSBoundFunction::ToString(Handle<JSBoundFunction>::cast(receiver)); 308 return *JSBoundFunction::ToString(Handle<JSBoundFunction>::cast(receiver));
309 } else if (receiver->IsJSFunction()) { 309 } else if (receiver->IsJSFunction()) {
310 return *JSFunction::ToString(Handle<JSFunction>::cast(receiver)); 310 return *JSFunction::ToString(Handle<JSFunction>::cast(receiver));
311 } 311 }
312 THROW_NEW_ERROR_RETURN_FAILURE( 312 THROW_NEW_ERROR_RETURN_FAILURE(
313 isolate, NewTypeError(MessageTemplate::kNotGeneric, 313 isolate, NewTypeError(MessageTemplate::kNotGeneric,
314 isolate->factory()->NewStringFromAsciiChecked( 314 isolate->factory()->NewStringFromAsciiChecked(
315 "Function.prototype.toString"))); 315 "Function.prototype.toString"),
316 isolate->factory()->Function_string()));
316 } 317 }
317 318
318 } // namespace internal 319 } // namespace internal
319 } // namespace v8 320 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins-number.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698