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

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

Issue 1132303003: Add %GetUndetectable() test intrinsic and add tests for undetectables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index 4c49d327b2b710ed0b52086adca01017ae115460..4afdd55c2c344889d9e890ed26d4282211c1abef 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -212,6 +212,18 @@ RUNTIME_FUNCTION(Runtime_GetOptimizationCount) {
}
+RUNTIME_FUNCTION(Runtime_GetUndetectable) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 0);
+
+ Local<v8::FunctionTemplate> desc =
+ v8::FunctionTemplate::New((v8::Isolate*)isolate);
+ desc->InstanceTemplate()->MarkAsUndetectable(); // undetectable
Toon Verwaest 2015/05/11 09:46:34 Seems like you just want a v8::ObjectTemplate here
titzer 2015/05/11 10:48:42 Done.
+ Local<v8::Object> obj = desc->GetFunction()->NewInstance();
+ return *Utils::OpenHandle(*obj);
+}
+
+
RUNTIME_FUNCTION(Runtime_ClearFunctionTypeFeedback) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);

Powered by Google App Engine
This is Rietveld 408576698