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

Unified Diff: src/runtime/runtime-classes.cc

Issue 1316933002: [es6] Initial steps towards a correct implementation of IsCallable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase again. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index d1c8568e58250b356bc2e2c3fece76595b383719..a66fe393be279b64ff17b8a9becc06e8d0aad02a 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -80,7 +80,7 @@ RUNTIME_FUNCTION(Runtime_ToMethod) {
CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
Handle<JSFunction> clone = JSFunction::CloneClosure(fun);
- Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol());
+ Handle<Symbol> home_object_symbol(isolate->factory()->home_object_symbol());
JSObject::SetOwnPropertyIgnoreAttributes(clone, home_object_symbol,
home_object, DONT_ENUM).Assert();
return *clone;
@@ -105,7 +105,7 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate, Handle<Object> name,
} else {
if (super_class->IsNull()) {
prototype_parent = isolate->factory()->null_value();
- } else if (super_class->IsSpecFunction()) {
+ } else if (super_class->IsJSFunction()) { // TODO(bmeurer): IsConstructor.
if (Handle<JSFunction>::cast(super_class)->shared()->is_generator()) {
THROW_NEW_ERROR(
isolate,
@@ -126,7 +126,6 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate, Handle<Object> name,
}
constructor_parent = super_class;
} else {
- // TODO(arv): Should be IsConstructor.
THROW_NEW_ERROR(
isolate,
NewTypeError(MessageTemplate::kExtendsValueNotFunction, super_class),
« 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