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

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

Issue 1476403004: Remove Object::IsSpecObject, use Object::IsJSReceiver instead. (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/property-descriptor.cc ('k') | src/runtime/runtime-object.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 isolate, 101 isolate,
102 NewTypeError(MessageTemplate::kExtendsValueGenerator, super_class), 102 NewTypeError(MessageTemplate::kExtendsValueGenerator, super_class),
103 Object); 103 Object);
104 } 104 }
105 ASSIGN_RETURN_ON_EXCEPTION( 105 ASSIGN_RETURN_ON_EXCEPTION(
106 isolate, prototype_parent, 106 isolate, prototype_parent,
107 Runtime::GetObjectProperty(isolate, super_class, 107 Runtime::GetObjectProperty(isolate, super_class,
108 isolate->factory()->prototype_string(), 108 isolate->factory()->prototype_string(),
109 SLOPPY), 109 SLOPPY),
110 Object); 110 Object);
111 if (!prototype_parent->IsNull() && !prototype_parent->IsSpecObject()) { 111 if (!prototype_parent->IsNull() && !prototype_parent->IsJSReceiver()) {
112 THROW_NEW_ERROR( 112 THROW_NEW_ERROR(
113 isolate, NewTypeError(MessageTemplate::kPrototypeParentNotAnObject, 113 isolate, NewTypeError(MessageTemplate::kPrototypeParentNotAnObject,
114 prototype_parent), 114 prototype_parent),
115 Object); 115 Object);
116 } 116 }
117 constructor_parent = super_class; 117 constructor_parent = super_class;
118 } else { 118 } else {
119 THROW_NEW_ERROR( 119 THROW_NEW_ERROR(
120 isolate, 120 isolate,
121 NewTypeError(MessageTemplate::kExtendsValueNotFunction, super_class), 121 NewTypeError(MessageTemplate::kExtendsValueNotFunction, super_class),
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 Handle<Object> result; 503 Handle<Object> result;
504 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 504 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
505 isolate, result, Execution::New(isolate, super_constructor, new_target, 505 isolate, result, Execution::New(isolate, super_constructor, new_target,
506 argument_count, arguments.get())); 506 argument_count, arguments.get()));
507 507
508 return *result; 508 return *result;
509 } 509 }
510 510
511 } // namespace internal 511 } // namespace internal
512 } // namespace v8 512 } // namespace v8
OLDNEW
« no previous file with comments | « src/property-descriptor.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698