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

Side by Side Diff: src/runtime/runtime-classes.cc

Issue 1467473002: Install ConstructNonConstructable as construct stub for non-constructables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years 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/runtime/runtime.h ('k') | src/runtime/runtime-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 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <limits> 8 #include <limits>
9 9
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 18 matching lines...) Expand all
29 RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) { 29 RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) {
30 HandleScope scope(isolate); 30 HandleScope scope(isolate);
31 DCHECK(args.length() == 0); 31 DCHECK(args.length() == 0);
32 THROW_NEW_ERROR_RETURN_FAILURE( 32 THROW_NEW_ERROR_RETURN_FAILURE(
33 isolate, NewReferenceError(MessageTemplate::kUnsupportedSuper)); 33 isolate, NewReferenceError(MessageTemplate::kUnsupportedSuper));
34 } 34 }
35 35
36 36
37 RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) { 37 RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) {
38 HandleScope scope(isolate); 38 HandleScope scope(isolate);
39 DCHECK(args.length() == 0); 39 DCHECK(args.length() == 1);
40 CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, 0);
41 Handle<Object> name(constructor->shared()->name(), isolate);
40 THROW_NEW_ERROR_RETURN_FAILURE( 42 THROW_NEW_ERROR_RETURN_FAILURE(
41 isolate, NewTypeError(MessageTemplate::kConstructorNonCallable)); 43 isolate, NewTypeError(MessageTemplate::kConstructorNonCallable, name));
42 } 44 }
43 45
44 46
45 RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) { 47 RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) {
46 HandleScope scope(isolate); 48 HandleScope scope(isolate);
47 DCHECK(args.length() == 0); 49 DCHECK(args.length() == 0);
48 THROW_NEW_ERROR_RETURN_FAILURE( 50 THROW_NEW_ERROR_RETURN_FAILURE(
49 isolate, NewTypeError(MessageTemplate::kArrayNotSubclassable)); 51 isolate, NewTypeError(MessageTemplate::kArrayNotSubclassable));
50 } 52 }
51 53
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 Handle<Object> result; 503 Handle<Object> result;
502 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 504 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
503 isolate, result, Execution::New(isolate, super_constructor, new_target, 505 isolate, result, Execution::New(isolate, super_constructor, new_target,
504 argument_count, arguments.get())); 506 argument_count, arguments.get()));
505 507
506 return *result; 508 return *result;
507 } 509 }
508 510
509 } // namespace internal 511 } // namespace internal
510 } // namespace v8 512 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698