Index: src/runtime/runtime-classes.cc |
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc |
index 19d1d3c3687583edd3c82d25286afbe94b619f62..f55ccb50211401e1ba5855b382db92f208b35fbb 100644 |
--- a/src/runtime/runtime-classes.cc |
+++ b/src/runtime/runtime-classes.cc |
@@ -56,6 +56,19 @@ RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) { |
} |
+RUNTIME_FUNCTION(Runtime_ThrowIfStaticPrototype) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(Name, name, 0); |
+ if (Name::Equals(name, isolate->factory()->prototype_string())) { |
+ THROW_NEW_ERROR_RETURN_FAILURE( |
+ isolate, |
+ NewTypeError("static_prototype", HandleVector<Object>(NULL, 0))); |
+ } |
+ return *name; |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_ToMethod) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 2); |