Version 1.13.0-dev.7.3
Cherry-pick b459efe0876951f8d82aebfa37fa5f5fa08755ef to dev
Cherry-pick 6a816f2dc19040f6dcd00f2d7c777b298b7e547a to dev
Cherry-pick 0beba7576f8e75a4dae54088922ae9ab5bbffbba to dev
Cherry-pick 29f3baf6465fe2d35b5d6ab49e6df0dff300fbd5 to dev
Cherry-pick 4e41dc0d66d240e20a5e470b66d9071ffad96094 to dev
Cherry-pick 1a7528174263af0a95d7edf51c01a2b3d1b568ff to dev
Cherry-pick ff200c11fad63dcbdc9f34645fb23eb2e949f14f to dev
Cherry-pick b90b67588a8885ae4bdfa7bc4a031f31a3d72a90 to dev
Cherry-pick 2586267dbb716991bb6634d4992f4dead252a347 to dev
Cherry-pick 4e5938f373cc47cb6266c7b76af1c913fbcd47bc to dev
Cherry-pick 41522f803a7c6df4d7bacce0a587da90d613b402 to dev
Cherry-pick 1fa2ef874d61eb3ea994d26009cb2d02a86e5bf3 to dev
Cherry-pick d164c23394d2afd34c7cd4d2dc96940789db7c77 to dev
Cherry-pick d796048fccea932b074a508505ccea1ab283f354 to dev
Cherry-pick e4a156785bdaa8ffda4c907559c3a8e35f6b6cdc to dev
Cherry-pick 54aee614a29c62c7b2fad43e07954a987754d37a to dev
Cherry-pick 9fc82d04aab3b569098fe7c6fab756afa1203e2b to dev
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 039c5cd..3ebd535 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,7 +39,33 @@
of a number of issues uncovered by the first few non-observatory
clients. This is a potentially breaking change for clients.
-## 1.12.0
+## 1.12.2 - 2015-10-21
+
+### Core library changes
+
+* `dart:io`
+
+ * A memory leak in creation of Process objects is fixed.
+
+## 1.12.1 - 2015-09-08
+
+### Tool changes
+
+* Pub
+
+ * Pub will now respect `.gitignore` when validating a package before it's
+ published. For example, if a `LICENSE` file exists but is ignored, that is
+ now an error.
+
+ * If the package is in a subdirectory of a Git repository and the entire
+ subdirectory is ignored with `.gitignore`, pub will act as though nothing
+ was ignored instead of uploading an empty package.
+
+ * The heuristics for determining when `pub get` needs to be run before various
+ commands have been improved. There should no longer be false positives when
+ non-dependency sections of the pubspec have been modified.
+
+## 1.12.0 - 2015-08-31
### Language changes
@@ -212,14 +238,14 @@
* Some RPCs that didn't include a `"jsonrpc"` property in their responses now
include one.
-## 1.11.2
+## 1.11.2 - 2015-08-03
### Core library changes
* Fix a bug where `WebSocket.close()` would crash if called after
`WebSocket.cancel()`.
-## 1.11.1
+## 1.11.1 - 2015-07-02
### Tool changes
diff --git a/DEPS b/DEPS
index 8043a46..780508f 100644
--- a/DEPS
+++ b/DEPS
@@ -51,7 +51,7 @@
"crypto_rev" : "@2df57a1e26dd88e8d0614207d4b062c73209917d",
"csslib_tag" : "@0.12.0",
"dart2js_info_rev" : "@c4ad464717e3a304fb0d44a6937c25ff2049b863",
- "dartdoc_rev" : "@1f54e8c2119d6d78ee7d19b477b8a90c27e1ea05",
+ "dartdoc_rev" : "@61bfb136ec1d314b977cfbfdbc79097243632ccf",
"dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
"dart_style_tag": "@0.2.0",
"dev_compiler_rev": "@0.1.9",
@@ -97,7 +97,7 @@
"shelf_web_socket_tag": "@0.0.1+4",
"source_map_stack_trace_tag": "@1.0.4",
"source_span_tag": "@1.2.0",
- "stack_trace_tag": "@1.3.4",
+ "stack_trace_tag": "@1.4.2",
"string_scanner_tag": "@0.1.4",
"sunflower_rev": "@879b704933413414679396b129f5dfa96f7a0b1e",
"test_tag": "@0.12.3+8",
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index e5f42ae..e204732 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -57,12 +57,12 @@
StreamSubscription<SourcesChangedEvent> _sourcesChangedSubscription;
/**
- * Code completion peformance for the last completion operation.
+ * Code completion performance for the last completion operation.
*/
CompletionPerformance performance;
/**
- * A list of code completion peformance measurements for the latest
+ * A list of code completion performance measurements for the latest
* completion operation up to [performanceListMaxLength] measurements.
*/
final List<CompletionPerformance> performanceList =
@@ -131,15 +131,19 @@
if (searchEngine == null) {
return new Response.noIndexGenerated(request);
}
- try {
- String requestName = request.method;
- if (requestName == COMPLETION_GET_SUGGESTIONS) {
- return processRequest(request);
+ return runZoned(() {
+ try {
+ String requestName = request.method;
+ if (requestName == COMPLETION_GET_SUGGESTIONS) {
+ return processRequest(request);
+ }
+ } on RequestFailure catch (exception) {
+ return exception.response;
}
- } on RequestFailure catch (exception) {
- return exception.response;
- }
- return null;
+ return null;
+ }, onError: (exception, stackTrace) {
+ server.sendServerErrorNotification(exception, stackTrace);
+ });
}
/**
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index 4535ca4..4443dfa 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -565,8 +565,8 @@
}
// Invalidate results that depend on this result.
_invalidateDependentResults(id, thisData, delta, level + 1);
- // If empty, remove the entry altogether.
- if (_resultMap.isEmpty) {
+ // If empty and not explicitly added, remove the entry altogether.
+ if (_resultMap.isEmpty && !explicitlyAdded) {
_partition._targetMap.remove(target);
_partition._removeIfSource(target);
}
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index 0f4c0f6..58d6c53 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -320,23 +320,21 @@
*/
void computeConstantValue(ConstantEvaluationTarget constant) {
validator.beforeComputeValue(constant);
- if (constant is ParameterElement) {
+ if (constant is ParameterElementImpl) {
if (constant.initializer != null) {
- Expression defaultValue =
- (constant as PotentiallyConstVariableElement).constantInitializer;
+ Expression defaultValue = constant.constantInitializer;
if (defaultValue != null) {
RecordingErrorListener errorListener = new RecordingErrorListener();
ErrorReporter errorReporter =
new ErrorReporter(errorListener, constant.source);
DartObjectImpl dartObject =
defaultValue.accept(new ConstantVisitor(this, errorReporter));
- (constant as ParameterElementImpl).evaluationResult =
+ constant.evaluationResult =
new EvaluationResultImpl(dartObject, errorListener.errors);
}
}
- } else if (constant is VariableElement) {
- Expression constantInitializer =
- (constant as PotentiallyConstVariableElement).constantInitializer;
+ } else if (constant is VariableElementImpl) {
+ Expression constantInitializer = constant.constantInitializer;
if (constantInitializer != null) {
RecordingErrorListener errorListener = new RecordingErrorListener();
ErrorReporter errorReporter =
@@ -355,7 +353,7 @@
[dartObject.type, constant.type]);
}
}
- (constant as VariableElementImpl).evaluationResult =
+ constant.evaluationResult =
new EvaluationResultImpl(dartObject, errorListener.errors);
}
} else if (constant is ConstructorElement) {
@@ -415,6 +413,12 @@
elementAnnotation.evaluationResult = new EvaluationResultImpl(null);
}
}
+ } else if (constant is VariableElement) {
+ // constant is a VariableElement but not a VariableElementImpl. This can
+ // happen sometimes in the case of invalid user code (for example, a
+ // constant expression that refers to a nonstatic field inside a generic
+ // class will wind up referring to a FieldMember). The error is detected
+ // elsewhere, so just silently ignore it here.
} else {
// Should not happen.
assert(false);
@@ -439,15 +443,14 @@
void computeDependencies(
ConstantEvaluationTarget constant, ReferenceFinderCallback callback) {
ReferenceFinder referenceFinder = new ReferenceFinder(callback);
- if (constant is ParameterElement) {
+ if (constant is ParameterElementImpl) {
if (constant.initializer != null) {
- Expression defaultValue =
- (constant as ConstVariableElement).constantInitializer;
+ Expression defaultValue = constant.constantInitializer;
if (defaultValue != null) {
defaultValue.accept(referenceFinder);
}
}
- } else if (constant is PotentiallyConstVariableElement) {
+ } else if (constant is VariableElementImpl) {
Expression initializer = constant.constantInitializer;
if (initializer != null) {
initializer.accept(referenceFinder);
@@ -532,6 +535,12 @@
if (constNode.arguments != null) {
constNode.arguments.accept(referenceFinder);
}
+ } else if (constant is VariableElement) {
+ // constant is a VariableElement but not a VariableElementImpl. This can
+ // happen sometimes in the case of invalid user code (for example, a
+ // constant expression that refers to a nonstatic field inside a generic
+ // class will wind up referring to a FieldMember). So just don't bother
+ // computing any dependencies.
} else {
// Should not happen.
assert(false);
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index de92b6a..5979466 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -2128,7 +2128,7 @@
*
* This class is not intended to be part of the public API for analyzer.
*/
-abstract class ConstVariableElement implements PotentiallyConstVariableElement {
+abstract class ConstVariableElement {
/**
* If this element represents a constant variable, and it has an initializer,
* a copy of the initializer for the constant. Otherwise `null`.
@@ -4157,7 +4157,6 @@
* A concrete implementation of a [FieldElement].
*/
class FieldElementImpl extends PropertyInducingElementImpl
- with PotentiallyConstVariableElement
implements FieldElement {
/**
* An empty list of field elements.
@@ -7913,7 +7912,6 @@
* A concrete implementation of a [LocalVariableElement].
*/
class LocalVariableElementImpl extends VariableElementImpl
- with PotentiallyConstVariableElement
implements LocalVariableElement {
/**
* An empty list of field elements.
@@ -8850,7 +8848,7 @@
* A concrete implementation of a [ParameterElement].
*/
class ParameterElementImpl extends VariableElementImpl
- with ParameterElementMixin, PotentiallyConstVariableElement
+ with ParameterElementMixin
implements ParameterElement {
/**
* An empty list of parameter elements.
@@ -9209,28 +9207,6 @@
}
/**
- * Interface used by elements that might represent constant variables.
- *
- * This class may be used as a mixin in the case where [constInitializer] is
- * known to return null.
- *
- * This class is not intended to be part of the public API for analyzer.
- */
-abstract class PotentiallyConstVariableElement
- implements VariableElementImpl, ConstantEvaluationTarget {
- /**
- * If this element represents a constant variable, and it has an initializer,
- * a copy of the initializer for the constant. Otherwise `null`.
- *
- * Note that in correct Dart code, all constant variables must have
- * initializers. However, analyzer also needs to handle incorrect Dart code,
- * in which case there might be some constant variables that lack
- * initializers.
- */
- Expression get constantInitializer => null;
-}
-
-/**
* A prefix used to import one or more libraries into another library.
*/
abstract class PrefixElement implements Element {
@@ -10039,7 +10015,6 @@
* A concrete implementation of a [TopLevelVariableElement].
*/
class TopLevelVariableElementImpl extends PropertyInducingElementImpl
- with PotentiallyConstVariableElement
implements TopLevelVariableElement {
/**
* An empty list of top-level variable elements.
@@ -10736,6 +10711,17 @@
}
/**
+ * If this element represents a constant variable, and it has an initializer,
+ * a copy of the initializer for the constant. Otherwise `null`.
+ *
+ * Note that in correct Dart code, all constant variables must have
+ * initializers. However, analyzer also needs to handle incorrect Dart code,
+ * in which case there might be some constant variables that lack
+ * initializers.
+ */
+ Expression get constantInitializer => null;
+
+ /**
* Return the result of evaluating this variable's initializer as a
* compile-time constant expression, or `null` if this variable is not a
* 'const' variable, if it does not have an initializer, or if the compilation
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index 4708aa0..0c5d9e8 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -467,15 +467,15 @@
@override
Uri restoreAbsolute(Source source) {
- String sourcePath = source.fullName;
+ String sourceUri = _toFileUri(source.fullName);
for (JavaFile packagesDirectory in _packagesDirectories) {
List<JavaFile> pkgFolders = packagesDirectory.listFiles();
if (pkgFolders != null) {
for (JavaFile pkgFolder in pkgFolders) {
try {
- String pkgCanonicalPath = pkgFolder.getCanonicalPath();
- if (sourcePath.startsWith(pkgCanonicalPath)) {
- String relPath = sourcePath.substring(pkgCanonicalPath.length);
+ String pkgCanonicalUri = _toFileUri(pkgFolder.getCanonicalPath());
+ if (sourceUri.startsWith(pkgCanonicalUri)) {
+ String relPath = sourceUri.substring(pkgCanonicalUri.length);
return parseUriWithException(
"$PACKAGE_SCHEME:${pkgFolder.getName()}$relPath");
}
@@ -501,6 +501,13 @@
}
/**
+ * Convert the given file path to a "file:" URI. On Windows, this transforms
+ * backslashes to forward slashes.
+ */
+ String _toFileUri(String filePath) =>
+ JavaFile.pathContext.toUri(filePath).toString();
+
+ /**
* Return `true` if the given URI is a `package` URI.
*
* @param uri the URI being tested
diff --git a/pkg/analyzer/lib/src/task/html.dart b/pkg/analyzer/lib/src/task/html.dart
index 1804c50..b603f1f 100644
--- a/pkg/analyzer/lib/src/task/html.dart
+++ b/pkg/analyzer/lib/src/task/html.dart
@@ -319,16 +319,17 @@
//
// Convert errors.
//
- List<ParseError> parseErrors = parser.errors;
List<AnalysisError> errors = <AnalysisError>[];
- for (ParseError parseError in parseErrors) {
- if (parseError.errorCode == 'expected-doctype-but-got-start-tag') {
- continue;
- }
- SourceSpan span = parseError.span;
- errors.add(new AnalysisError(target.source, span.start.offset,
- span.length, HtmlErrorCode.PARSE_ERROR, [parseError.message]));
- }
+ // TODO(scheglov) https://github.com/dart-lang/sdk/issues/24643
+// List<ParseError> parseErrors = parser.errors;
+// for (ParseError parseError in parseErrors) {
+// if (parseError.errorCode == 'expected-doctype-but-got-start-tag') {
+// continue;
+// }
+// SourceSpan span = parseError.span;
+// errors.add(new AnalysisError(target.source, span.start.offset,
+// span.length, HtmlErrorCode.PARSE_ERROR, [parseError.message]));
+// }
//
// Record outputs.
//
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 2028e70..743399e 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -1009,6 +1009,20 @@
verify([source]);
}
+ void test_constEval_nonStaticField_inGenericClass() {
+ Source source = addSource('''
+class C<T> {
+ const C();
+ T get t => null;
+}
+
+const x = const C().t;''');
+ computeLibrarySourceErrors(source);
+ assertErrors(source,
+ [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
+ verify([source]);
+ }
+
void test_constEval_propertyExtraction_targetNotConst() {
Source source = addSource(r'''
class A {
diff --git a/pkg/analyzer/test/src/context/cache_test.dart b/pkg/analyzer/test/src/context/cache_test.dart
index b012ffd..75c156a 100644
--- a/pkg/analyzer/test/src/context/cache_test.dart
+++ b/pkg/analyzer/test/src/context/cache_test.dart
@@ -596,6 +596,21 @@
expect(cache.get(target), entry);
}
+ test_setState_invalid_keepEmpty_ifExplicitlyAdded() {
+ AnalysisTarget target = new TestSource('/a.dart');
+ CacheEntry entry = new CacheEntry(target);
+ entry.explicitlyAdded = true;
+ cache.put(entry);
+ ResultDescriptor result = new ResultDescriptor('result1', -1);
+ // set results, all of them are VALID
+ entry.setValue(result, 111, TargetedResult.EMPTY_LIST);
+ expect(entry.getState(result), CacheState.VALID);
+ expect(entry.getValue(result), 111);
+ // invalidate result, keep entry
+ entry.setState(result, CacheState.INVALID);
+ expect(cache.get(target), isNotNull);
+ }
+
test_setState_invalid_removeEmptyEntry() {
AnalysisTarget target1 = new TestSource('/a.dart');
AnalysisTarget target2 = new TestSource('/b.dart');
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 554bc0a..69c86e9 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -56,6 +56,21 @@
@reflectiveTest
class AnalysisContextImplTest extends AbstractContextTest {
+ void fail_getErrors_html_some() {
+ Source source = addSource(
+ "/test.html",
+ r'''
+<html><head>
+<script type='application/dart' src='test.dart'/>
+</head></html>''');
+ AnalysisErrorInfo errorInfo = context.getErrors(source);
+ expect(errorInfo, isNotNull);
+ List<AnalysisError> errors = errorInfo.errors;
+ expect(errors, hasLength(0));
+ errors = context.computeErrors(source);
+ expect(errors, hasLength(2));
+ }
+
Future fail_implicitAnalysisEvents_removed() async {
AnalyzedSourcesListener listener = new AnalyzedSourcesListener();
context.implicitAnalysisEvents.listen(listener.onData);
@@ -893,21 +908,6 @@
expect(errors, hasLength(0));
}
- void test_getErrors_html_some() {
- Source source = addSource(
- "/test.html",
- r'''
-<html><head>
-<script type='application/dart' src='test.dart'/>
-</head></html>''');
- AnalysisErrorInfo errorInfo = context.getErrors(source);
- expect(errorInfo, isNotNull);
- List<AnalysisError> errors = errorInfo.errors;
- expect(errors, hasLength(0));
- errors = context.computeErrors(source);
- expect(errors, hasLength(2));
- }
-
void test_getHtmlFilesReferencing_html() {
Source htmlSource = addSource(
"/test.html",
diff --git a/pkg/analyzer/test/src/task/html_test.dart b/pkg/analyzer/test/src/task/html_test.dart
index a901165..0806e90 100644
--- a/pkg/analyzer/test/src/task/html_test.dart
+++ b/pkg/analyzer/test/src/task/html_test.dart
@@ -177,6 +177,23 @@
@reflectiveTest
class HtmlErrorsTaskTest extends AbstractContextTest {
+ fail_perform_htmlErrors() {
+ AnalysisTarget target = newSource(
+ '/test.html',
+ r'''
+<html>
+ <head>
+ <title>test page</not-title>
+ </head>
+ <body>
+ Test
+ </body>
+</html>
+''');
+ computeResult(target, HTML_ERRORS, matcher: isHtmlErrorsTask);
+ expect(outputs[HTML_ERRORS], hasLength(1));
+ }
+
test_constructor() {
Source source = newSource('/test.html');
HtmlErrorsTask task = new HtmlErrorsTask(context, source);
@@ -223,23 +240,6 @@
expect(outputs[HTML_ERRORS], hasLength(1));
}
- test_perform_htmlErrors() {
- AnalysisTarget target = newSource(
- '/test.html',
- r'''
-<html>
- <head>
- <title>test page</not-title>
- </head>
- <body>
- Test
- </body>
-</html>
-''');
- computeResult(target, HTML_ERRORS, matcher: isHtmlErrorsTask);
- expect(outputs[HTML_ERRORS], hasLength(1));
- }
-
test_perform_noErrors() {
AnalysisTarget target = newSource(
'/test.html',
@@ -303,7 +303,7 @@
<title>test page</title>
</head>
<body>
- <h1 Test>
+ <h1>Test</h1>
</body>
</html>
''';
@@ -311,7 +311,7 @@
computeResult(target, HTML_DOCUMENT);
expect(task, isParseHtmlTask);
expect(outputs[HTML_DOCUMENT], isNotNull);
- expect(outputs[HTML_DOCUMENT_ERRORS], isNotEmpty);
+ expect(outputs[HTML_DOCUMENT_ERRORS], isEmpty);
// LINE_INFO
{
LineInfo lineInfo = outputs[LINE_INFO];
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index 6d59fff..41389a5 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -275,22 +275,6 @@
/* patch */ static Isolate get current => _currentIsolate;
- /* patch */ static Future<Uri> get packageRoot {
- var hook = VMLibraryHooks.getPackageRoot;
- if (hook == null) {
- throw new UnimplementedError("Isolate.packageRoot");
- }
- return hook();
- }
-
- /* patch */ static Future<Map<String, Uri>> get packageMap {
- var hook = VMLibraryHooks.getPackageMap;
- if (hook == null) {
- throw new UnimplementedError("Isolate.packageMap");
- }
- return hook();
- }
-
/* patch */ static Future<Isolate> spawn(
void entryPoint(message), var message,
{bool paused: false, bool errorsAreFatal,
@@ -330,8 +314,7 @@
bool errorsAreFatal,
bool checked,
Map<String, String> environment,
- Uri packageRoot,
- Map<String, Uri> packageMap}) {
+ Uri packageRoot}) {
RawReceivePort readyPort;
if (environment != null) throw new UnimplementedError("environment");
try {
@@ -340,14 +323,6 @@
var packageRootString =
(packageRoot == null) ? null : packageRoot.toString();
var packagesList = null;
- if (packageMap != null) {
- packagesList = new List(2 * packageMap.length);
- var i = 0;
- packageMap.forEach((key, value) {
- packagesList[i++] = key;
- packagesList[i++] = Uri.base.resolveUri(value).toString();
- });
- }
_spawnUri(readyPort.sendPort, uri.toString(),
args, message,
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index a92b4d5..3434e01 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -1119,6 +1119,7 @@
VariableAt(v, &var_name, &token_pos, &end_token_pos, &var_value);
if (var_name.raw() != Symbols::AsyncOperation().raw()) {
JSONObject jsvar(&jsvars);
+ jsvar.AddProperty("type", "BoundVariable");
jsvar.AddProperty("name", var_name.ToCString());
jsvar.AddProperty("value", var_value, !full);
// TODO(turnidge): Do we really want to provide this on every
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index ceecf06..6110846 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -14857,6 +14857,7 @@
if (!field.is_static()) {
fieldValue ^= GetField(field);
JSONObject jsfield(&jsarr);
+ jsfield.AddProperty("type", "BoundField");
jsfield.AddProperty("decl", field);
jsfield.AddProperty("value", fieldValue);
}
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
index 655a51c..ac8b537 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -20,16 +20,6 @@
static Isolate get current => _currentIsolateCache;
@patch
- static Future<Uri> get packageRoot {
- throw new UnsupportedError("Isolate.packageRoot");
- }
-
- @patch
- static Future<Map<String, Uri>> get packageMap {
- throw new UnsupportedError("Isolate.packageMap");
- }
-
- @patch
static Future<Isolate> spawn(void entryPoint(message), var message,
{bool paused: false, bool errorsAreFatal,
SendPort onExit, SendPort onError}) {
@@ -76,11 +66,9 @@
bool errorsAreFatal,
bool checked,
Map<String, String> environment,
- Uri packageRoot,
- Map<String, Uri> packageMap}) {
+ Uri packageRoot}) {
if (environment != null) throw new UnimplementedError("environment");
if (packageRoot != null) throw new UnimplementedError("packageRoot");
- if (packageMap != null) throw new UnimplementedError("packageMap");
bool forcePause = (errorsAreFatal != null) ||
(onExit != null) ||
(onError != null);
@@ -94,7 +82,7 @@
} else if (args != null) {
throw new ArgumentError("Args must be a list of Strings $args");
}
- // TODO: Handle [packageRoot]/[packages] somehow, possibly by throwing.
+ // TODO: Handle [packageRoot] somehow, possibly by throwing.
// TODO: Consider passing the errorsAreFatal/onExit/onError values
// as arguments to the internal spawnUri instead of setting
// them after the isolate has been created.
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 73e0a05..cc5be5b 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -529,7 +529,6 @@
'XPathNSResolver': () => XPathNSResolver,
'XPathResult': () => XPathResult,
'XSLTProcessor': () => XsltProcessor,
-
};
// TODO(leafp): We may want to move this elsewhere if html becomes
@@ -20228,6 +20227,13 @@
//
// See https://github.com/dart-lang/sdk/issues/23666
int creating = 0;
+
+ // If any JS code is hooked we want to call it too.
+ var oldCreatedCallback = elemProto['createdCallback'];
+ var oldAttributeChangedCallback = elemProto['attributeChangedCallback'];
+ var oldAttachedCallback = elemProto['attachedCallback'];
+ var oldDetachedCallback = elemProto['detachedCallback'];
+
// TODO(jacobr): warning:
elemProto['createdCallback'] = js.JsNative.withThis(($this) {
if (_getJSClassName(reflectClass(customElementClass).superclass) != null && creating < 2) {
@@ -20266,15 +20272,27 @@
creating--;
}
}
+
+ if (oldCreatedCallback != null)
+ oldCreatedCallback.apply([], thisArg: unwrap_jso($this));
});
elemProto['attributeChangedCallback'] = new js.JsFunction.withThis(($this, attrName, oldVal, newVal) {
$this.attributeChanged(attrName, oldVal, newVal);
+
+ if (oldAttributeChangedCallback != null)
+ oldAttributeChangedCallback.apply([], thisArg: unwrap_jso($this));
});
elemProto['attachedCallback'] = new js.JsFunction.withThis(($this) {
$this.attached();
+
+ if (oldAttachedCallback != null)
+ oldAttachedCallback.apply([], thisArg: unwrap_jso($this));
});
elemProto['detachedCallback'] = new js.JsFunction.withThis(($this) {
$this.detached();
+
+ if (oldDetachedCallback != null)
+ oldDetachedCallback.apply([], thisArg: unwrap_jso($this));
});
// document.registerElement('x-foo', {prototype: elemProto, extends: extendsTag});
var jsMap = new js.JsObject.jsify({'prototype': elemProto, 'extends': extendsTag});
@@ -36962,10 +36980,10 @@
if ((blob_OR_source_OR_stream is Blob || blob_OR_source_OR_stream == null)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
- if ((blob_OR_source_OR_stream is MediaSource)) {
+ if ((blob_OR_source_OR_stream is MediaStream)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
- if ((blob_OR_source_OR_stream is MediaStream)) {
+ if ((blob_OR_source_OR_stream is MediaSource)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
throw new ArgumentError("Incorrect number or type of arguments");
diff --git a/sdk/lib/html/html_common/conversions_dartium.dart b/sdk/lib/html/html_common/conversions_dartium.dart
index 1ed1e13..0f2c075 100644
--- a/sdk/lib/html/html_common/conversions_dartium.dart
+++ b/sdk/lib/html/html_common/conversions_dartium.dart
@@ -121,24 +121,7 @@
var wrapper = js.getDartHtmlWrapperFor(jsObject);
// if we have a wrapper return the Dart instance.
- if (wrapper != null) {
- var customElementClass = getCustomElementType(wrapper.blink_jsObject);
- if (wrapper.runtimeType != customElementClass && customElementClass != null) {
- if (wrapper.runtimeType == HtmlElement && !wrapper.isBadUpgrade) {
- // We're a Dart instance if it's HtmlElement and we have a customElement
- // class then we need to upgrade.
- if (customElementClass != null) {
- var dartClass_instance;
- try {
- dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
- } finally {
- dartClass_instance.blink_jsObject = jsObject;
- return dartClass_instance;
- }
- }
- }
- }
-
+ if (wrapper != null && wrapper is! js.JsObject) {
return wrapper;
}
@@ -180,33 +163,35 @@
extendsTag = custom['extends'];
}
- // Custom Element to upgrade.
- // Only allow custome elements to be created in the html or svg default
+ // Only allow custom elements to be created in the html or svg default
// namespace.
+ var func;
var defaultNS = jsObject['namespaceURI'] == 'http://www.w3.org/1999/xhtml' ||
jsObject['namespaceURI'] == 'http://www.w3.org/2000/svg';
if (customElementClass != null && extendsTag == "" && defaultNS) {
- try {
- dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
- } finally {
- dartClass_instance.blink_jsObject = jsObject;
- js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
- }
+ // The customElementClass is known but we can't create the real class so
+ // create the HtmlElement and it will get upgraded when registerElement's
+ // createdCallback is called.
+ func = getHtmlCreateFunction('HTMLElement');
} else {
- var func = getHtmlCreateFunction(jsTypeName);
+ func = getHtmlCreateFunction(jsTypeName);
if (func == null) {
if (jsTypeName == 'auto-binding') {
- func = getHtmlCreateFunction("HTMLTemplateElement");
+ func = getHtmlCreateFunction('HTMLTemplateElement');
} else if (jsObject.toString() == "[object HTMLElement]") {
// One last ditch effort could be a JS custom element.
- func = getHtmlCreateFunction("HTMLElement");
+ func = getHtmlCreateFunction('HTMLElement');
}
}
- if (func != null) {
- dartClass_instance = func();
- dartClass_instance.blink_jsObject = jsObject;
- js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
- }
+ }
+
+ // Can we construct a Dart class?
+ if (func != null) {
+ dartClass_instance = func();
+
+ // Wrap our Dart instance in both directions.
+ dartClass_instance.blink_jsObject = jsObject;
+ js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
}
// TODO(jacobr): cache that this is not a dart:html JS class.
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 587a88e..8d284d2 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -127,29 +127,6 @@
external static Isolate get current;
/**
- * Returns the package root of the current isolate, if any.
- *
- * If the isolate is using a [packageMap], this getter returns `null`,
- * otherwise it returns the package root - a directory that package
- * URIs are resolved against.
- */
- external static Future<Uri> get packageRoot;
-
- /**
- * Returns the package mapping of the current isolate, if any.
- *
- * If the current isolate is using a [packageRoot], this getter
- * returns `null`.
- *
- * The package map maps the name of a package that is available to the
- * program, to a URI that package URIs for that package are resolved against.
- *
- * Returns an empty map if the isolate does not have a way to resolve package
- * URIs.
- */
- external static Future<Map<String, Uri>> get packageMap;
-
- /**
* Creates and spawns an isolate that shares the same code as the current
* isolate.
*
@@ -235,8 +212,8 @@
*
* WARNING: The [checked] parameter is not implemented on all platforms yet.
*
- * If either the [packageRoot] or the [packageMap] parameter is provided,
- * it is used to find the location of package sources in the spawned isolate.
+ * If the [packageRoot] parameter is provided, it is used to find the location
+ * of package sources in the spawned isolate.
*
* The `packageRoot` URI must be a "file" or "http"/"https" URI that specifies
* a directory. If it doesn't end in a slash, one will be added before
@@ -245,21 +222,6 @@
* resolved against this location, as by
* `packageRoot.resolve("foo/bar.dart")`.
*
- * The `packageMap` map maps package names to URIs with the same requirements
- * as `packageRoot`. Package imports (like `"package:foo/bar/baz.dart"`) in
- * the new isolate are resolved against the URI for that package (if any),
- * as by `packages["foo"].resolve("bar/baz.dart")
- *
- * This resolution also applies to the main entry [uri]
- * if that happens to be a package-URI.
- *
- * If both [packageRoot] and [packageMap] are omitted, the new isolate uses
- * the same package resolution as the current isolate.
- * It's not allowed to provide both a `packageRoot` and a `package` parameter.
- *
- * WARNING: The [packageRoot] and [packageMap] parameters are not implemented
- * on all platforms yet.
- *
* The [environment] is a mapping from strings to strings which the
* spawned isolate uses when looking up [String.fromEnvironment] values.
* The system may add its own entries to environment as well.
@@ -282,8 +244,7 @@
bool errorsAreFatal,
bool checked,
Map<String, String> environment,
- Uri packageRoot,
- Map<String, Uri> packageMap});
+ Uri packageRoot});
/**
* Requests the isolate to pause.
diff --git a/sdk/lib/js/dart2js/js_dart2js.dart b/sdk/lib/js/dart2js/js_dart2js.dart
index 417876e..f98b29d 100644
--- a/sdk/lib/js/dart2js/js_dart2js.dart
+++ b/sdk/lib/js/dart2js/js_dart2js.dart
@@ -704,7 +704,7 @@
}
_callDartFunctionFastCaptureThis(callback, self, List arguments) {
- return _convertToJS(Function.apply(callback, [self]..addAll(arguments)));
+ return Function.apply(callback, [self]..addAll(arguments));
}
Function allowInterop(Function f) {
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 63280a7..28fd4cb 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -675,6 +675,7 @@
LayoutTests/fast/css/aspect-ratio-inheritance_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/css/aspect-ratio-parsing-tests_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/css/auto-min-size_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/css/background-position-serialize_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/checked-pseudo-selector_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/content-language-case-insensitivity_t01: RuntimeError # Issue 23506
@@ -701,10 +702,13 @@
LayoutTests/fast/css/font-face-unicode-range-load_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/css/font-face-unicode-range-monospace_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: Pass, RuntimeError # Please triage this failure
+LayoutTests/fast/css/font-shorthand-from-longhands_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/fontfaceset-events_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/css/fontfaceset-loadingdone_t01: Pass, RuntimeError # Please triage this failure
+LayoutTests/fast/css/getComputedStyle/computed-style-font_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/getComputedStyle/computed-style-properties_t01: RuntimeError # Issue 23506
LayoutTests/fast/css/getComputedStyle/counterIncrement-without-counter_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/css/getPropertyValue-columns_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/id-or-class-before-stylesheet_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/image-set-setting_t01: RuntimeError # Please triage this failure
@@ -720,8 +724,10 @@
LayoutTests/fast/css/media-query-recovery_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/nested-at-rules_t01: RuntimeError # Issue 23506
+LayoutTests/fast/css/parse-color-int-or-percent-crash_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-at-rule-recovery_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/css/parsing-css-nonascii_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-selector-error-recovery_t01: RuntimeError # Please triage this failure
@@ -735,6 +741,7 @@
LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/css/selector-text-escape_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/shadow-current-color_t01: Skip # Times out. Please triage this failure
LayoutTests/fast/css/sticky/parsing-position-sticky_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/string-quote-binary_t01: RuntimeError # Please triage this failure
@@ -802,6 +809,7 @@
LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError # Please triage this failure
LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: RuntimeError # Please triage this failure
LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: RuntimeError # Please triage this failure
LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/dom/HTMLSelectElement/selected-index-preserved-when-option-text-changes_t01: RuntimeError # Issue 18127
LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc_t01: RuntimeError # Please triage this failure
@@ -826,6 +834,7 @@
LayoutTests/fast/dom/StyleSheet/css-medialist-item_t01: RuntimeError # Please triage this failure
LayoutTests/fast/dom/TreeWalker/TreeWalker-basic_t01: RuntimeError # Please triage this failure
LayoutTests/fast/dom/Window/getMatchedCSSRules-nested-rules_t01: Pass, RuntimeError # Please triage this failure
+LayoutTests/fast/dom/Window/getMatchedCSSRules-with-pseudo-elements-complex_t01: RuntimeError # Please triage this failure
LayoutTests/fast/dom/Window/window-resize-contents_t01: RuntimeError # Please triage this failure
LayoutTests/fast/dom/Window/window-resize_t01: RuntimeError # Please triage this failure
LayoutTests/fast/dom/Window/window-scroll-arguments_t01: RuntimeError # Please triage this failure
@@ -916,6 +925,7 @@
LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError # Please triage this failure
LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError # Please triage this failure
LayoutTests/fast/filesystem/filesystem-reference_t01: Pass, RuntimeError # Please triage this failure
+LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError # Please triage this failure
LayoutTests/fast/forms/autofocus-focus-only-once_t01: Skip # Times out. Please triage this failure
LayoutTests/fast/forms/autofocus-input-css-style-change_t01: Skip # Times out. Please triage this failure
LayoutTests/fast/forms/autofocus-opera-007_t01: Skip # Times out. Please triage this failure
@@ -947,6 +957,7 @@
LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError # Please triage this failure
LayoutTests/fast/forms/select-clientheight-with-multiple-attr_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/forms/select-list-box-mouse-focus_t01: Pass, RuntimeError # Please triage this failure
+LayoutTests/fast/forms/select-max-length_t01: RuntimeError # Please triage this failure
LayoutTests/fast/forms/setrangetext_t01: RuntimeError # Please triage this failure
LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError # Please triage this failure
LayoutTests/fast/forms/textfield-focus-out_t01: Skip # Times out. Please triage this failure
@@ -976,11 +987,10 @@
LayoutTests/fast/masking/parsing-mask_t01: RuntimeError # Please triage this failure
LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError # Please triage this failure
LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: Skip # Issue 23475
-LayoutTests/fast/multicol/balance-short-trailing-empty-block_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/multicol/balance-trailing-border_t01: RuntimeError # Please triage this failure
LayoutTests/fast/multicol/balance-trailing-border_t02: RuntimeError # Please triage this failure
LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError # Please triage this failure
LayoutTests/fast/multicol/break-properties_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError # Please triage this failure
LayoutTests/fast/multicol/cssom-view_t01: RuntimeError # Please triage this failure
LayoutTests/fast/multicol/flipped-blocks-hit-test_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/multicol/float-truncation_t01: RuntimeError # Please triage this failure
@@ -1001,7 +1011,6 @@
LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError # Please triage this failure
LayoutTests/fast/multicol/vertical-rl/image-inside-nested-blocks-with-border_t01: RuntimeError # Please triage this failure
LayoutTests/fast/multicol/widows_t01: Pass, RuntimeError # Please triage this failure
-LayoutTests/fast/multicol/widows_t02: RuntimeError # Please triage this failure
LayoutTests/fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError # Please triage this failure
LayoutTests/fast/parser/foster-parent-adopted_t02: RuntimeError # Please triage this failure
LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError # Please triage this failure
@@ -1317,7 +1326,6 @@
WebPlatformTest/html/semantics/selectors/pseudo-classes/link_t01: RuntimeError # Please triage this failure
WebPlatformTest/html/semantics/selectors/pseudo-classes/valid-invalid_t01: Pass, RuntimeError # Please triage this failure
WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError # Please triage this failure
-WebPlatformTest/html/semantics/tabular-data/the-tr-element/rowIndex_t01: RuntimeError # Please triage this failure
WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t01: Pass, RuntimeError # Please triage this failure
WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t02: RuntimeError # Please triage this failure
WebPlatformTest/html/syntax/serializing-html-fragments/outerHTML_t01: RuntimeError # Please triage this failure
@@ -1451,6 +1459,7 @@
LayoutTests/fast/text/line-break-after-question-mark_t01: RuntimeError # Please triage this failure
LayoutTests/fast/text/text-combine-shrink-to-fit_t01: RuntimeError # Please triage this failure
LibTest/async/Timer/Timer.periodic_A01_t01: Skip # Times out. Please triage this failure
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01: Skip # Times out. Please triage this failure
[ $compiler == dart2js && $runtime == chrome && $system != macos ]
LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError # Please triage this failure
@@ -1535,19 +1544,37 @@
LayoutTests/fast/text/regional-indicator-symobls_t01: RuntimeError # Please triage this failure
LayoutTests/fast/text/text-combine-shrink-to-fit_t01: RuntimeError # Please triage this failure
+[ $compiler == dart2js && $runtime == chrome && $system == windows ]
+LayoutTests/fast/canvas/canvas-blend-image_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-clipping_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-color-over-gradient_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-color-over-image_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-color-over-pattern_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-fill-style_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-gradient-over-image_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-image-over-image_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-image-over-pattern_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-pattern-over-color_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-pattern-over-gradient_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-pattern-over-pattern_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-shadow_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-composite-alpha_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-composite-canvas_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-composite-image_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-composite-stroke-alpha_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError # Please triage this failure
+
[ $compiler == dart2js && $runtime == chrome && $system != linux ]
-# These are failures in Chrome 45, which is not yet on Linux.
-# This will be merged with the earlier blocks when Linux is updated.
-LayoutTests/fast/css/background-position-serialize_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/font-shorthand-from-longhands_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/getComputedStyle/computed-style-font_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/getPropertyValue-columns_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/parse-color-int-or-percent-crash_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/multicol/balance-short-trailing-empty-block_t01: Pass
-LayoutTests/fast/multicol/balance-trailing-border_t01: Pass
-LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError # Please triage this failure
-LayoutTests/fast/multicol/widows_t02: Pass
LayoutTests/fast/xpath/py-dom-xpath/abbreviations_t01: RuntimeError # Issue 24398
[ $compiler == dart2js && $runtime == ff && $system == linux]
diff --git a/tests/co19/co19-dartium.status b/tests/co19/co19-dartium.status
index b9ce88a..5136124 100644
--- a/tests/co19/co19-dartium.status
+++ b/tests/co19/co19-dartium.status
@@ -26,7 +26,6 @@
LayoutTests/fast/xpath/py-dom-xpath/axes_t01: RuntimeError # Dartium JSInterop failure
WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t01: Pass, RuntimeError # Flaky with Dartium JsInterop. Seems like timing issues in the test.
LibTest/html/IFrameElement/IFrameElement.created_A01_t01: RuntimeError # Issue 24568
-LibTest/html/Window/document_A01_t01: RuntimeError # Issue 24585
LibTest/html/Window/requestFileSystem_A02_t01: Skip # Issue 24585.
[ $compiler == none && $runtime == dartium && $checked ]
diff --git a/tests/html/html.status b/tests/html/html.status
index 893d8ee..fd87d0e 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -98,18 +98,16 @@
touchevent_test/supported: Fail # Touch events are only supported on touch devices
element_animate_test/omit_timing: RuntimeError # Also timing out on MacOS. Issue 23507
element_animate_test/timing_dict: RuntimeError # Also timing out on MacOS. Issue 23507
+element_animate_test/simple_timing: RuntimeError # Please triage this failure
[ $runtime == chrome && $system == macos ]
+canvasrenderingcontext2d_test/drawImage_video_element: Skip # Times out. Please triage this failure.
+canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Skip # Times out. Please triage this failure.
element_animate_test/omit_timing: Skip # Timing out on MacOS. Issue 23507
element_animate_test/timing_dict: Skip # Timing out on MacOS. Issue 23507
transition_event_test/functional: Skip # Times out. Issue 22167
request_animation_frame_test: Skip # Times out. Issue 22167
-[ $runtime == chrome && $system != linux ]
-# These are failures in Chrome 45, which is not yet on Linux.
-# This will be merged with the earlier blocks when Linux is updated.
-element_animate_test/simple_timing: RuntimeError # Please triage this failure
-
[$runtime == drt || $runtime == dartium || $runtime == chrome || $runtime == chromeOnAndroid || $runtime == ContentShellOnAndroid ]
webgl_1_test: Pass, Fail # Issue 8219
diff --git a/tests/html/js_typed_interop_test.dart b/tests/html/js_typed_interop_test.dart
index 04915d2..7325a87 100644
--- a/tests/html/js_typed_interop_test.dart
+++ b/tests/html/js_typed_interop_test.dart
@@ -38,6 +38,7 @@
callClosureWithArgAndThis: function(closure, arg) {
return closure.apply(this, [arg]);
},
+
getBar: function() {
return bar;
}
@@ -111,7 +112,6 @@
external callClosureWithArg2(Function closure, arg1, arg2);
external Bar getBar();
external static int multiplyDefault2(int a, [int b]);
-
}
@JS()
@@ -129,8 +129,7 @@
}
@JS('Bar')
-class Bar
- {
+class Bar {
external String get x;
external bool get multiplyByX;
external Foo getFoo();
@@ -255,6 +254,7 @@
addThisXAndArg(Foo that, int arg) {
return foo.x + arg;
}
+
var wrappedCaptureThisClosure = allowInteropCaptureThis(addThisXAndArg);
foo.x = 20;
expect(foo.callClosureWithArgAndThis(wrappedCaptureThisClosure, 10),
@@ -266,6 +266,27 @@
identical(allowInteropCaptureThis(addThisXAndArg),
wrappedCaptureThisClosure),
isTrue);
+
+ ExampleLiteral addXValues(that, ExampleLiteral arg) {
+ return new ExampleLiteral(x: that.x + arg.x);
+ }
+
+ // Check to make sure returning a JavaScript value from a Dart closure
+ // works as expected.
+ expect(
+ foo
+ .callClosureWithArg2(allowInterop(addXValues),
+ new ExampleLiteral(x: 20), new ExampleLiteral(x: 10))
+ .x,
+ equals(30));
+
+ foo.x = 50;
+ expect(
+ foo
+ .callClosureWithArgAndThis(allowInteropCaptureThis(addXValues),
+ new ExampleLiteral(x: 10))
+ .x,
+ equals(60));
});
test('call from dart', () {
@@ -274,10 +295,10 @@
expect(returnNumArgsFn(), equals(0));
expect(returnNumArgsFn("a", "b", "c"), equals(3));
expect(returnNumArgsFn("a", "b", "c", null, null), equals(5));
- expect(returnNumArgsFn(1,2,3,4,5,6, null), equals(7));
- expect(returnNumArgsFn(1,2,3,4,5,6,7,8), equals(8));
- expect(returnLastArgFn(1,2,"foo"), equals("foo"));
- expect(returnLastArgFn(1,2,3,4,5,6,"foo"), equals("foo"));
+ expect(returnNumArgsFn(1, 2, 3, 4, 5, 6, null), equals(7));
+ expect(returnNumArgsFn(1, 2, 3, 4, 5, 6, 7, 8), equals(8));
+ expect(returnLastArgFn(1, 2, "foo"), equals("foo"));
+ expect(returnLastArgFn(1, 2, 3, 4, 5, 6, "foo"), equals("foo"));
});
});
diff --git a/tests/isolate/package_map_test.dart b/tests/isolate/package_map_test.dart
deleted file mode 100644
index 3e34dc0..0000000
--- a/tests/isolate/package_map_test.dart
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2015, 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.
-
-import 'dart:io';
-import 'dart:isolate';
-
-final NOT_HERE = "notHere";
-final NOT_HERE_URI = "file:///no/such/file/";
-
-class Foo {}
-
-void main([args, port]) {
- if (port != null) {
- testPackageRoot(port);
- return;
- }
- var p = new RawReceivePort();
- p.handler = (msg) {
- p.close();
- // Cannot use the expect package here because the spawned isolate
- // would not be able to handle it.
- if (msg is! List) {
- throw "Bad response from child isolate: $msg";
- }
- if (msg.length != 2) {
- throw "Length should be 2: ${msg.length}\nmsg: $msg";
- }
- if (msg[0] != NOT_HERE) {
- throw "Key should be $NOT_HERE: ${msg[0]}";
- }
- if (msg[1] != NOT_HERE_URI) {
- throw "Value should be $NOT_HERE_URI: ${msg[1]}";
- }
- };
- Isolate.spawnUri(Platform.script,
- [],
- p.sendPort,
- packageMap: {
- NOT_HERE: Uri.parse(NOT_HERE_URI)
- });
-}
-
-testPackageRoot(port) async {
- var packageMap = await Isolate.packageMap;
- var packageMapEntries = [];
- if (packageMap is! Map) {
- port.send("packageMap is not a Map: ${packageMap.runtimeType}");
- return;
- }
- var ok = true;
- packageMap.forEach((k, v) {
- if (ok && (k is! String)) {
- port.send("Key $k is not a String: ${k.runtimeType}");
- ok = false;
- }
- packageMapEntries.add(k);
- if (ok && (v is! Uri)) {
- port.send("Value $v is not a Uri: ${v.runtimeType}");
- ok = false;
- }
- packageMapEntries.add(v.toString());
- });
- if (ok) {
- port.send(packageMapEntries);
- }
-}
diff --git a/tests/isolate/package_root_test.dart b/tests/isolate/package_root_test.dart
deleted file mode 100644
index a17bce7..0000000
--- a/tests/isolate/package_root_test.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2014, 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.
-
-import 'dart:io';
-import 'dart:isolate';
-
-final SPAWN_PACKAGE_ROOT = "file:///no/such/file/";
-
-void main([args, port]) {
- if (port != null) {
- testPackageRoot(port);
- return;
- }
- var p = new RawReceivePort();
- Isolate.spawnUri(Platform.script,
- [],
- p.sendPort,
- packageRoot: Uri.parse(SPAWN_PACKAGE_ROOT));
- p.handler = (msg) {
- p.close();
- if (msg != SPAWN_PACKAGE_ROOT) {
- throw "Bad package root in child isolate: $msg";
- }
- };
-}
-
-testPackageRoot(port) async {
- var packageRoot = await Isolate.packageRoot;
- port.send(packageRoot.toString());
-}
diff --git a/tools/VERSION b/tools/VERSION
index f633fa3..67945602 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
MINOR 13
PATCH 0
PRERELEASE 7
-PRERELEASE_PATCH 2
+PRERELEASE_PATCH 3
diff --git a/tools/deps/dartium.deps/DEPS b/tools/deps/dartium.deps/DEPS
index 13f641e..9266b01 100644
--- a/tools/deps/dartium.deps/DEPS
+++ b/tools/deps/dartium.deps/DEPS
@@ -14,7 +14,7 @@
"dartium_chromium_commit": "62a7524d4f71c9e0858d24b0aa1bbff3a2d09bff",
"chromium_base_revision": "297060",
"dartium_webkit_branch": "/blink/branches/dart/dartium",
- "dartium_webkit_revision": "202688",
+ "dartium_webkit_revision": "202689",
# We use mirrors of all github repos to guarantee reproducibility and
# consistency between what users see and what the bots see.
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
index 1df549e..6cbf883 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -436,6 +436,13 @@
//
// See https://github.com/dart-lang/sdk/issues/23666
int creating = 0;
+
+ // If any JS code is hooked we want to call it too.
+ var oldCreatedCallback = elemProto['createdCallback'];
+ var oldAttributeChangedCallback = elemProto['attributeChangedCallback'];
+ var oldAttachedCallback = elemProto['attachedCallback'];
+ var oldDetachedCallback = elemProto['detachedCallback'];
+
// TODO(jacobr): warning:
elemProto['createdCallback'] = js.JsNative.withThis(($this) {
if (_getJSClassName(reflectClass(customElementClass).superclass) != null && creating < 2) {
@@ -474,15 +481,27 @@
creating--;
}
}
+
+ if (oldCreatedCallback != null)
+ oldCreatedCallback.apply([], thisArg: unwrap_jso($this));
});
elemProto['attributeChangedCallback'] = new js.JsFunction.withThis(($this, attrName, oldVal, newVal) {
$this.attributeChanged(attrName, oldVal, newVal);
+
+ if (oldAttributeChangedCallback != null)
+ oldAttributeChangedCallback.apply([], thisArg: unwrap_jso($this));
});
elemProto['attachedCallback'] = new js.JsFunction.withThis(($this) {
$this.attached();
+
+ if (oldAttachedCallback != null)
+ oldAttachedCallback.apply([], thisArg: unwrap_jso($this));
});
elemProto['detachedCallback'] = new js.JsFunction.withThis(($this) {
$this.detached();
+
+ if (oldDetachedCallback != null)
+ oldDetachedCallback.apply([], thisArg: unwrap_jso($this));
});
// document.registerElement('x-foo', {prototype: elemProto, extends: extendsTag});
var jsMap = new js.JsObject.jsify({'prototype': elemProto, 'extends': extendsTag});