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

Unified Diff: Source/bindings/tests/results/V8TestObjectPython.cpp

Issue 27476003: IDL compiler: [Unforgeable] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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 | « Source/bindings/tests/idls/TestObjectPython.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestObjectPython.cpp
diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp
index 605ceaaeeb7320b5338d8c3f6c15ef924eb8a8f0..cc5b6aae48bf152f7c7bae04bc584929cb257557 100644
--- a/Source/bindings/tests/results/V8TestObjectPython.cpp
+++ b/Source/bindings/tests/results/V8TestObjectPython.cpp
@@ -1515,6 +1515,22 @@ static void urlReadonlyStringAttributeAttributeGetterCallback(v8::Local<v8::Stri
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
+static void unforgeableReadonlyLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestObjectPython::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate())));
+ if (holder.IsEmpty())
+ return;
+ TestObjectPython* imp = V8TestObjectPython::toNative(holder);
+ v8SetReturnValueInt(info, imp->unforgeableReadonlyLongAttribute());
+}
+
+static void unforgeableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectPythonV8Internal::unforgeableReadonlyLongAttributeAttributeGetter(name, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
+}
+
} // namespace TestObjectPythonV8Internal
static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttributes[] = {
@@ -1620,6 +1636,7 @@ static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib
{"treatReturnedNullStringAsUndefinedReadonlyStringAttribute", TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"urlReadonlyStringAttribute", TestObjectPythonV8Internal::urlReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"urlReadonlyStringAttribute", TestObjectPythonV8Internal::urlReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"unforgeableReadonlyLongAttribute", TestObjectPythonV8Internal::unforgeableReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), static_cast<v8::PropertyAttribute>(v8::DontDelete), 0 /* on instance */},
};
static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
« no previous file with comments | « Source/bindings/tests/idls/TestObjectPython.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698