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

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: ia32, arm and arm64 ports. Misc cleanups. Created 5 years, 4 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
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index c485759a191ba7fbab6e5755293830a53f5b6108..00dc7386ea91108ff43e4a9fa86df30cd5c119f0 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -79,7 +79,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());
Michael Starzinger 2015/08/27 10:47:14 nit: Use assignment instead of constructor for thi
JSObject::SetOwnPropertyIgnoreAttributes(clone, home_object_symbol,
home_object, DONT_ENUM).Assert();
return *clone;
@@ -104,7 +104,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,
@@ -125,7 +125,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),

Powered by Google App Engine
This is Rietveld 408576698