| 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 %}
|
|
|