| Index: tools/dom/scripts/systemnative.py
|
| diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
|
| index 5aa06eef28629804c7a0bf57f0a53cf2eac25eac..1f45b15f68dc40654918ba007261dc558d506f69 100644
|
| --- a/tools/dom/scripts/systemnative.py
|
| +++ b/tools/dom/scripts/systemnative.py
|
| @@ -864,7 +864,7 @@ class DartiumBackend(HtmlDartGenerator):
|
|
|
| if requires_script_state:
|
| body_emitter.Emit(
|
| - ' ScriptState* currentState = ScriptState::current();\n'
|
| + ' ScriptState* currentState = DartUtilities::currentScriptState();\n'
|
| ' if (!currentState) {\n'
|
| ' exception = Dart_NewStringFromCString("Failed to retrieve a script state");\n'
|
| ' goto fail;\n'
|
| @@ -891,7 +891,7 @@ class DartiumBackend(HtmlDartGenerator):
|
| self._cpp_impl_includes.add('"ScriptCallStack.h"')
|
| body_emitter.Emit(
|
| '\n'
|
| - ' ScriptState* currentState = ScriptState::current();\n'
|
| + ' ScriptState* currentState = DartUtilities::currentScriptState();\n'
|
| ' if (!currentState) {\n'
|
| ' exception = Dart_NewStringFromCString("Failed to retrieve a script state");\n'
|
| ' goto fail;\n'
|
| @@ -914,10 +914,7 @@ class DartiumBackend(HtmlDartGenerator):
|
| ' Dart_Handle customArgument = Dart_GetNativeArgument(args, $INDEX);\n'
|
| ' RefPtr<ScriptArguments> scriptArguments(DartUtilities::createScriptArguments(customArgument, exception));\n'
|
| ' if (!scriptArguments)\n'
|
| - ' goto fail;\n'
|
| - ' RefPtr<ScriptCallStack> scriptCallStack(DartUtilities::createScriptCallStack());\n'
|
| - ' if (!scriptCallStack->size())\n'
|
| - ' return;\n',
|
| + ' goto fail;\n',
|
| INDEX=len(arguments) + 1)
|
|
|
| if needs_custom_element_callbacks:
|
|
|