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

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: Fix bot failure 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') | no next file with comments »
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 ba8de1cc9c70aee427f8566dfd884c3eae736619..d3c1cfb23f32fdee4672a9b97fe82cf748f262c2 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1352,6 +1352,18 @@ 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);
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698