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

Unified Diff: src/api.cc

Issue 414213002: Add a new api in ObjectTemplate to prohibit interceptor for V8DOM binding (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: rework the patch by adding new kind of interceptor Created 6 years, 3 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/lookup.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 4e10def26bb51b32f5cb9a276cbb88f91c39fd78..ac406b7a9526fb73860cb4d62946c94be2deb1ea 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1457,6 +1457,7 @@ void ObjectTemplate::SetNamedPropertyHandler(
data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
}
obj->set_data(*Utils::OpenHandle(*data));
+ obj->set_flag(i::Smi::FromInt(0));
cons->set_named_property_handler(*obj);
}
@@ -1533,6 +1534,7 @@ void ObjectTemplate::SetIndexedPropertyHandler(
data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
}
obj->set_data(*Utils::OpenHandle(*data));
+ obj->set_flag(i::Smi::FromInt(0));
cons->set_indexed_property_handler(*obj);
}
@@ -1582,6 +1584,18 @@ void ObjectTemplate::SetInternalFieldCount(int value) {
}
+void ObjectTemplate::UninterceptorRealName(bool unset) {
+ i::Object* obj = Utils::OpenHandle(this)->constructor();
+ if (!obj->IsUndefined()) {
+ i::FunctionTemplateInfo* info = i::FunctionTemplateInfo::cast(obj);
+ i::InterceptorInfo* interceptor =
+ i::InterceptorInfo::cast(info->named_property_handler());
+ if (!interceptor->IsUndefined())
+ interceptor->set_do_not_interceptor_real_name(unset);
+ }
+}
+
+
// --- S c r i p t s ---
« no previous file with comments | « include/v8.h ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698