Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index 33534a786e4e4378d0bae7c60c06669816303f5a..84ad3e91dbff8e174299286641d636d0a3d30903 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -9,6 +9,7 @@ |
#include "src/arguments.h" |
#include "src/ast/prettyprinter.h" |
#include "src/bootstrapper.h" |
+#include "src/builtins/builtins.h" |
#include "src/conversions.h" |
#include "src/debug/debug.h" |
#include "src/frames-inl.h" |
@@ -492,5 +493,22 @@ RUNTIME_FUNCTION(Runtime_Typeof) { |
return *Object::TypeOf(isolate, object); |
} |
+RUNTIME_FUNCTION(Runtime_CountUsage) { |
gsathya
2017/01/11 17:27:31
There is IncrementUseCounter which does the same
jochen (gone - plz use gerrit)
2017/01/11 18:09:57
good catch, thx
|
+ HandleScope scope(isolate); |
+ DCHECK_EQ(1, args.length()); |
+ CONVERT_INT32_ARG_CHECKED(counter_id, 0); |
+ isolate->CountUsage(static_cast<v8::Isolate::UseCounterFeature>(counter_id)); |
+ return isolate->heap()->undefined_value(); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_AllowDynamicFunction) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(1, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0); |
+ Handle<JSObject> global_proxy(target->global_proxy(), isolate); |
+ return *isolate->factory()->ToBoolean( |
+ Builtins::AllowDynamicFunction(isolate, target, global_proxy)); |
+} |
+ |
} // namespace internal |
} // namespace v8 |