Chromium Code Reviews| Index: src/runtime.cc |
| diff --git a/src/runtime.cc b/src/runtime.cc |
| index 893e31be5cd740e8d28192a4799c9cd59d614bf5..69269c78f31fcdd9ca40022333691afca77b246c 100644 |
| --- a/src/runtime.cc |
| +++ b/src/runtime.cc |
| @@ -7804,6 +7804,18 @@ RUNTIME_FUNCTION(Runtime_MathPowRT) { |
| } |
| +RUNTIME_FUNCTION(Runtime_IsConstructor) { |
|
rossberg
2014/07/08 08:39:17
Drive-by-comment: Unfortunately, I don't think thi
rossberg
2014/07/08 09:59:09
And more importantly, for JSFunctions it is testin
|
| + HandleScope scope(isolate); |
| + ASSERT(args.length() == 1); |
| + |
| + CONVERT_ARG_CHECKED(JSFunction, obj, 0); |
| + if (!obj->IsObject()) return isolate->heap()->false_value(); |
| + bool hasConstructor = !!obj->GetConstructor(); |
| + return hasConstructor ? isolate->heap()->true_value() |
| + : isolate->heap()->false_value(); |
| +} |
| + |
| + |
| RUNTIME_FUNCTION(Runtime_RoundNumber) { |
| HandleScope scope(isolate); |
| ASSERT(args.length() == 1); |