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

Unified Diff: sky/engine/bindings2/scripts/templates/attributes_cpp.template

Issue 918333002: Add the c++ code part of bindings2/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Updated per earlier reviews Created 5 years, 10 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
Index: sky/engine/bindings2/scripts/templates/attributes_cpp.template
diff --git a/sky/engine/bindings2/scripts/templates/attributes_cpp.template b/sky/engine/bindings2/scripts/templates/attributes_cpp.template
index 5d6c7aa347b45c9f84b2411ce678138268641265..cc0184087c4041bb18f2d9a43c204833c1e93895 100644
--- a/sky/engine/bindings2/scripts/templates/attributes_cpp.template
+++ b/sky/engine/bindings2/scripts/templates/attributes_cpp.template
@@ -8,7 +8,7 @@ static void {{static_attribute_name(attribute, 'Getter')}}(Dart_NativeArguments
{% if attribute.is_call_with_execution_context %}
ExecutionContext* context = DOMDartState::CurrentDocument();
if (!context) {
- exception = Dart_NewStringFromCString("Failed to retrieve a context");
+ exception = ToDart("Failed to retrieve a context");
goto fail;
}
{% endif %}
@@ -95,7 +95,7 @@ static void {{static_attribute_name(attribute, 'Setter')}}(Dart_NativeArguments
ExecutionContext* context = DOMDartState::CurrentDocument();
if (!context) {
- exception = Dart_NewStringFromCString("Failed to retrieve a context");
+ exception = ToDart("Failed to retrieve a context");
goto fail;
}
@@ -104,7 +104,7 @@ static void {{static_attribute_name(attribute, 'Setter')}}(Dart_NativeArguments
{% if attribute.is_call_with_script_state %}
ScriptState* state = DartUtilities::currentScriptState();
if (!state) {
- exception = Dart_NewStringFromCString("Failed to retrieve a script state");
+ exception = ToDart("Failed to retrieve a script state");
goto fail;
}
{% endif %}
« no previous file with comments | « sky/engine/bindings2/scheduled_action.cc ('k') | sky/engine/bindings2/scripts/templates/methods_cpp.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698