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

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: Rebased 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
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.h ('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 79877b9b07a57259182df9451627fbf28a117d03..e871d788a3cd27920426e076557165a08214a48f 100644
--- a/Source/bindings/tests/results/V8TestObjectPython.cpp
+++ b/Source/bindings/tests/results/V8TestObjectPython.cpp
@@ -5262,6 +5262,19 @@ static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo
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[] = {
@@ -5671,6 +5684,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);
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698