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

Unified Diff: Source/bindings/templates/interface.cpp

Issue 109943003: IDL compiler: [ConstructorCallWith] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add FIXME Created 7 years 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/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index c0e9a1c3161630568227c79e32fb165edaeba218..40563f7c1c153dde12e9dcefb7b33fb2d03086f4 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -137,6 +137,12 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{% if is_constructor_raises_exception %}
ExceptionState exceptionState(info.Holder(), info.GetIsolate());
{% endif %}
+ {% if is_constructor_call_with_execution_context %}
+ ExecutionContext* context = getExecutionContext();
+ {% endif %}
+ {% if is_constructor_call_with_document %}
+ Document& document = *toDocument(getExecutionContext());
+ {% endif %}
RefPtr<{{cpp_class}}> impl = {{cpp_class}}::create({{constructor_arguments | join(', ')}});
v8::Handle<v8::Object> wrapper = info.Holder();
{% if is_constructor_raises_exception %}
« no previous file with comments | « Source/bindings/scripts/unstable/v8_interface.py ('k') | Source/bindings/tests/idls/TestInterfaceConstructor.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698