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

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

Issue 59853010: IDL compiler: [PerContextEnabled] methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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: Source/bindings/tests/results/V8TestObjectPython.cpp
diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp
index 8fa3f073b4cf0649292acdac99e8c2e70c192b95..7caf4b5e257b08c11c0666255b6cab3d6d5c0246 100644
--- a/Source/bindings/tests/results/V8TestObjectPython.cpp
+++ b/Source/bindings/tests/results/V8TestObjectPython.cpp
@@ -5222,6 +5222,19 @@ static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
+static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
+ imp->perContextEnabledVoidMethod();
+}
+
+static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ TestObjectPythonV8Internal::perContextEnabledVoidMethodMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
+}
+
} // namespace TestObjectPythonV8Internal
static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttributes[] = {
@@ -5628,6 +5641,17 @@ void V8TestObjectPython::installPerContextEnabledProperties(v8::Handle<v8::Objec
}
}
+void V8TestObjectPython::installPerContextEnabledPrototypeProperties(v8::Handle<v8::Object> proto, v8::Isolate* isolate)
+{
+ UNUSED_PARAM(proto);
+ v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(isolate, worldType(isolate)));
+ UNUSED_PARAM(defaultSignature);
+
+ ExecutionContext* context = toExecutionContext(proto->CreationContext());
+ if (context && context->isDocument() && ContextFeatures::featureNameEnabled(toDocument(context)))
+ proto->Set(v8::String::NewSymbol("perContextEnabledVoidMethod"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::perContextEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
+}
+
v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPython> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl);
« Source/bindings/templates/interface.cpp ('K') | « Source/bindings/tests/results/V8TestObjectPython.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698