Added js_util import to html_dart2js

Change-Id: Ic643e3bbf521fa116984a27f504a2642f2052f36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210100
Commit-Queue: Gabriel Castro <gabrielmcastro@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Gabriel Castro 2021-08-13 23:13:31 +00:00 committed by commit-bot@chromium.org
parent d2855e703e
commit fc4d4144fb
3 changed files with 5 additions and 3 deletions

View file

@ -2002,7 +2002,7 @@ class Dart2JSBackend(HtmlDartGenerator):
' $RENAME$METADATA$MODIFIERS$TYPE $NAME($PARAMS) => '\
'js_util.callMethod(this, \'$JSNAME\', [$ARGS]);\n'
if CanUseStaticExtensions(self._interface_name, self._generate_static_extensions) else
' $RENAME$METADATA$MODIFIERS$TYPE $NAME($PARAMS) native;\n',
'\n $RENAME$METADATA$MODIFIERS$TYPE $NAME($PARAMS) native;\n',
RENAME=self._RenamingAnnotation(info.declared_name, html_name),
METADATA=self._Metadata(
info.type_name, info.declared_name,

View file

@ -1,10 +1,11 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
$(ANNOTATIONS)@sealed$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$MIXINS$IMPLEMENTS { $!CLASSMEMBERS }
//todo: add @sealed annotation
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$MIXINS$IMPLEMENTS { $!CLASSMEMBERS }
extension $(CLASSNAME)Extension on $CLASSNAME {
$!EXTENSIONMEMBERS

View file

@ -52,6 +52,7 @@ import 'dart:_interceptors' show
getNativeInterceptor,
setDispatchProperty;
import 'dart:_foreign_helper' show JS, JS_INTERCEPTOR_CONSTANT;
import 'dart:js_util' as js_util;
export 'dart:_internal' show HttpStatus;
export 'dart:html_common' show promiseToFuture;