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

Unified Diff: src/api.cc

Issue 7229007: Add possibility to configure 'prototype' property via FunctionTemplate (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 9 years, 6 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/api.cc
diff --git a/src/api.cc b/src/api.cc
index 3fe5621703ef3ca04f8f6af312ece30c318a883b..43adcdef55b6f2c08a68676eb6932ad211c58f91 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -884,6 +884,7 @@ static void InitializeFunctionTemplate(
i::Handle<i::FunctionTemplateInfo> info) {
info->set_tag(i::Smi::FromInt(Consts::FUNCTION_TEMPLATE));
info->set_flag(0);
+ info->set_prototype_properties(i::Smi::FromInt(v8::None));
}
@@ -1106,6 +1107,16 @@ void FunctionTemplate::SetHiddenPrototype(bool value) {
}
+void FunctionTemplate::SetPrototypeProperties(int flags) {
Mads Ager (chromium) 2011/06/22 12:13:46 SetPrototypeAttributes or SetPrototypePropertyAttr
Jakob Kummerow 2011/06/22 12:36:59 Done. "SetPrototypeAttributes" is long enough, so
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
+ if (IsDeadCheck(isolate, "v8::FunctionTemplate::SetPrototypeProperties()")) {
+ return;
+ }
+ ENTER_V8(isolate);
+ Utils::OpenHandle(this)->set_prototype_properties(i::Smi::FromInt(flags));
+}
+
+
void FunctionTemplate::SetNamedInstancePropertyHandler(
NamedPropertyGetter getter,
NamedPropertySetter setter,

Powered by Google App Engine
This is Rietveld 408576698