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

Unified Diff: src/api.cc

Issue 1409593002: [api] expose API for adding per-context Intrinsics to Templates (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « include/v8.h ('k') | src/api-natives.h » ('j') | src/api-natives.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 75939db8bb1d9c7503ac7357dd5a510ca326ff21..c5e21ea4d8334e2b48a82a3001dda698dce1b93a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1352,6 +1352,19 @@ void Template::SetNativeDataProperty(v8::Local<Name> name,
}
+void Template::SetIntrinsicDataProperty(Local<Name> name, Intrinsic intrinsic,
+ PropertyAttribute attribute) {
+ auto templ = Utils::OpenHandle(this);
+ i::Isolate* isolate = templ->GetIsolate();
+ ENTER_V8(isolate);
+ i::HandleScope scope(isolate);
+ // TODO(dcarney): split api to allow values of v8::Value or v8::TemplateInfo.
Toon Verwaest 2015/10/20 15:00:54 dcarney doesn't work on v8 anymore
caitp (gmail) 2015/10/20 15:38:06 Copy/pasted from one of the similar methods. Do yo
Toon Verwaest 2015/10/21 16:02:48 What it probably wants is what jochen is working o
+ i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name),
+ intrinsic,
+ static_cast<PropertyAttributes>(attribute));
+}
+
+
void ObjectTemplate::SetAccessor(v8::Local<String> name,
AccessorGetterCallback getter,
AccessorSetterCallback setter,
« no previous file with comments | « include/v8.h ('k') | src/api-natives.h » ('j') | src/api-natives.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698