Commit graph

7132 commits

Author SHA1 Message Date
Lasse R.H. Nielsen edff0face7 Make String.allMatches lazy.
R=floitsch@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//1273713003 .
2015-08-12 11:01:21 +02:00
Seth Ladd b30a7a1750 change param name to match docs
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1287453002 .
2015-08-11 10:55:16 -07:00
John McCutchan 590557dfd0 When no service response is requested, send null back to the service isolate so it can cleanup
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org//1285673003 .
2015-08-11 07:13:09 -07:00
Asger Feldthaus 136ec727ee dart2js: Do not use JSDouble for native behavior return types.
Previously, a JS('double', ...) expression would be seen as having
the exact JSDouble class as return type. This is problematic since that
class is reserved for non-integer doubles, and the result is generally
not known to be non-integer.

For example, the sqrt function returns 'double' but sqrt(0) == 0 which
is an integer.

BUG=
R=floitsch@google.com

Committed: b0905eadce

Review URL: https://codereview.chromium.org//1276353006.
2015-08-11 15:14:50 +02:00
Florian Loitsch 0370922ca4 Improve documentation for Pattern.allMatches.
R=lrn@google.com

Review URL: https://codereview.chromium.org//1272743004 .
2015-08-11 13:26:07 +02:00
Lasse R.H. Nielsen e9f48a37e8 Add getters for callbacks on StreamController.
R=floitsch@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//1278873008 .
2015-08-11 10:55:48 +02:00
John McCutchan 5f02eb3c62 Move service extension handler execution to a timer
R=iposva@google.com

Review URL: https://codereview.chromium.org//1282883003 .
2015-08-10 14:56:43 -07:00
Seth Ladd d71110f31f Fix comment formatting 2015-08-10 08:50:37 -07:00
Lasse R.H. Nielsen 90643a7ef7 Make HttpClient not send fragments as part of request.
Make HttpServer ignore fragments sent in requests (which are invalid HTTP request syntax).

Add `removeFragment` method to Uri.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1281973004 .
2015-08-10 12:18:12 +02:00
John McCutchan 0f13b9c931 Allow Dart code to register service protocol handlers
- Add 'registerExtension' to dart:developer
- A service protocol handler must implement ServiceExtensionHandler
- Service extensions can report result OR error code / message

R=turnidge@google.com

Review URL: https://codereview.chromium.org//1270103002 .
2015-08-06 16:20:56 -07:00
Ryan Macnak b6c979f20b Hoist InstanceMirror.delegate to ObjectMirror.
BUG=http://dartbug.com/14827
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1273983002 .
2015-08-05 17:09:59 -07:00
Lasse R.H. Nielsen 0a35f7be3b Update Changelog.
Fix various typos and style nits.

BUG=23961
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1272593002 .
2015-08-05 12:58:30 +02:00
Søren Gjesse 2ca0bc6d5a Echo the WebSocket close reason as well as the close code
When receiving a close frame with a code and reason both the code
and the reason are now added to the close frame send as response.
Before only the code was added

BUG=https://github.com/dart-lang/sdk/issues/23964
R=kustermann@google.com

Review URL: https://codereview.chromium.org//1273663002 .
2015-08-05 11:53:32 +02:00
Sigurd 58c18aaa9b Fix typos in doc-string.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//371523006 .
2015-08-05 11:15:39 +02:00
Srdjan Mitrovic caa3cce77e Fix some TODOs
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1263963003 .
2015-08-04 17:13:22 -07:00
John McCutchan a2757141b0 Make dart:developer log more user friendly
- Make required arguments required.
- Validate required arguments in Dart before calling native.
- timestamp is now a DateTime.
- level has a default (ALL).
- sequence number is last + 1 if not provided.

R=lrn@google.com

Review URL: https://codereview.chromium.org//1266053003 .
2015-08-04 07:12:39 -07:00
John McCutchan 7640cf4b85 Fix test failure
patch from issue 1271693003 at patchset 20001 (http://crrev.com/1271693003#ps20001)

Review URL: https://codereview.chromium.org//1270953003 .
2015-08-04 07:05:34 -07:00
William Hesse bdda0eff52 Revert "Change msg to message in debugger function."
This reverts commit 2ae214316c.

BUG=

Review URL: https://codereview.chromium.org//1261203005 .
2015-08-04 15:22:47 +02:00
Lasse R.H. Nielsen 2ae214316c Change msg to message in debugger function.
BUG=23949
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1271693003 .
2015-08-04 14:58:13 +02:00
Florian Loitsch e9b91c7c92 Default values for static functions are now inside closures. (in the startup emitter).
Since static closures are const values, they can reference each other in the default values:

foo([x = bar]) => null;
bar([x = foo]) => null;

Therefore, we must not reference the default values during tear-off installation (as was the case until now).

The corresponding test has been uploaded in https://chromiumcodereview.appspot.com/1255083008/

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1266903004 .
2015-08-04 13:56:28 +02:00
Florian Loitsch 0231f6ba39 dart2js: fix named arguments with Function.apply in the startup emitter.
This includes a full rewrite of the Function.apply in the runtime.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1252533003 .
2015-08-03 18:06:31 +02:00
Florian Loitsch f6b142c5f4 dart2js: Support const symbols in the startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1253443003 .
2015-08-03 17:56:34 +02:00
Florian Loitsch 8d6063d806 dart2js: support isolates in the startup-emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1249023002 .
2015-08-03 17:48:43 +02:00
Florian Loitsch 62b49eadc6 dart2js: support tear-offs in the startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1229923005 .
2015-08-03 17:02:31 +02:00
Lasse R.H. Nielsen ac33dfe194 Fix missing generic type parameters on streams.
Add test.

BUG= 23859
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1250373007 .
2015-08-03 14:21:17 +02:00
Florian Loitsch ffb72ee817 Make sure '_globalState' is set before calling computeThisScript.
As first line of running `_globalState = new _Manager()` we invoked `_nativeDetectEnvironment()`. However, that one could ending up calling the getter `IsolateNatives.thisScript` which, in turn could need `_globalState`. Since the state wasn't set yet, this yielded a NPE.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1264543004 .
2015-08-03 10:37:41 +02:00
Johnni Winther 783ed933ff Fix boolean conversion bug in dart2js + update JSRegExp accordingly.
BUG=
R=herhut@google.com

Review URL: https://codereview.chromium.org//1259473005.
2015-07-27 14:19:26 +02:00
John McCutchan bfd2d4ed2a Refactor dart:developer log to use named parameters
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1247803002 .
2015-07-21 10:01:37 -07:00
John McCutchan f818f9dc0f Support piping log data over the service protocol
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1241683005 .
2015-07-21 07:54:46 -07:00
Florian Loitsch fb4633a1c5 dart2js: Use JS_GET_NAME instead of magic constant for catch-all function.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1245573002 .
2015-07-20 14:53:59 +02:00
Alan Knight cd8c569632 Make sure NodeValidator uriAttributes aren't passed as attributes
WIP

BUG=
R=terry@google.com

Review URL: https://codereview.chromium.org//1236413002 .
2015-07-17 14:12:44 -07:00
Alan Knight 8d0ceaad7b Another try at placating the type checking for FilteredElementList
BUG=

Review URL: https://codereview.chromium.org//1230313008 .
2015-07-17 12:41:17 -07:00
Alan Knight de3ce04f0a Fix type problem with FilteredElementList._iterable
BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org//1236793006 .
2015-07-17 10:53:19 -07:00
Lasse R.H. Nielsen 848f6c978c Do "path normalization" when creating a URI.
Path normaliztion removes '.' and '..' segments from a URI. Such relative references are only intended for URI References, and Uri References are only intended for resolving against a full URI.

We do path normalization on all URIs that have a scheme, authority or an absolute path, and partial normalization on what are really just relative paths. The partial normalization can leave ".." at the start of the path.

The URI reference resolution algorithm doesn't work as expected for a URI ending in "..". Resolving "./foo" wrt. a base of "/a/.." results in  "/a/foo" - this is avoided when the base is path normalized before it's used.

This also fixes the "normalizePath" function which currently removes leading '..' segments, contrary to its documentation. It also makes the function redundant since all URI paths are normalized automatically.

See discussion on http://dartbug.com/23688

Also fix bug in the removeDotSegments function.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1224263009.
2015-07-17 17:08:36 +02:00
Terry L. Lucas 206ffe343b Revert "- Update _blink library using dart:js instead of native keyword"
This reverts commit 8ecb64d6b0.

TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1237263005 .
2015-07-17 07:45:12 -07:00
Terry L. Lucas 8ecb64d6b0 - Update _blink library using dart:js instead of native keyword
- Fixed dart:js event wrapping
- Fixed dart2js gen when --gen-interop used
- Cleanup and enabled static window() for JS interop
- Enabled --gen-interop
- Added --gen-interop switch

R=vsm@google.com,alanknight@google.com

Review URL: https://codereview.chromium.org//1234273003 .
2015-07-17 07:37:18 -07:00
Lasse R.H. Nielsen 4a8a844c34 Add setters for callbacks on StreamController.
This allows you to create a stream controller at one point and
add or change the callbacks later. This can be useful if you
want to store a stream controller in a final instance field and
also want the controller to call instance methods as callbacks.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1242023007.
2015-07-17 12:03:00 +02:00
Alan Knight d5599eb63b Restore workaround for old Chrome bug that also affects Safari and in some cases Firefox, fix test suppressions
BUG=

Review URL: https://codereview.chromium.org//1242063002 .
2015-07-16 13:20:26 -07:00
Alan Knight 4e790fef3d appendHtml, when sanitizing, should create document fragment in the right context
BUG=
R=terry@google.com

Committed: 560f12bb21

Committed: 930a40daa5

Review URL: https://codereview.chromium.org//1221043003 .
2015-07-16 10:30:51 -07:00
Lasse R.H. Nielsen e4881c55d0 Add errorsAreFatal, onExit and onError parameters to the spawn functions.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1240743003.
2015-07-16 16:52:43 +02:00
Florian Loitsch 547a0c4c04 dart2js: More documentation for embedded globals and shared property names.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1236033006 .
2015-07-16 14:57:30 +02:00
Natalie Weizenbaum bdd5803006 Fix a WebSocket crash.
Previously, a WebSocket would crash if it was closed after its
StreamSubscription was canceled. Now, it tracks whether the subscription
was canceled by canceling and nulling out its own internal subscription.

Fixes #23845

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//1234163002 .
2015-07-15 13:30:06 -07:00
Lasse R.H. Nielsen 4ee6246556 Add split function to LineSplitter class in dart:convert.
The split function returns a lazy iterable of the lines, unlike the convert
function which returns a list.
This makes the function usable on large strings where not all of the lines
are needed.

Closes https://github.com/dart-lang/sdk/issues/23837

R=kevmoo@google.com

Review URL: https://codereview.chromium.org//1240623002 .
2015-07-15 12:26:24 +02:00
Cristian Almstrand 3b125d3bc9 Please refer to https://code.google.com/p/dart/issues/detail?id=23418 for the bug reportincluding a WebStorm project which demonstrates the problem.
This proposal includes a fix to ensure that indices passed to the public functions defined in class FilteredElementList of the dart:html package consistently refer to element indices (not element indices sometimes, and node indices other times). Without this change, it is not possible to reliably insert elements relative to other elements. This can be problematic as the order of HTML elements must be guaranteed to ensure elements appear where expected in a normal page flow.

This proposal also address the TODO in file sdk/lib/html/html_common/filtered_element_list.dart to avoid excessively creating/allocating a filtered list of elements from nodes whenever calling [], every, any, length, etc. The implementation is less concise but should result in much reduced memory allocation and speed improvements.

R=alanknight@google.com

Review URL: https://codereview.chromium.org//1129333002 .

Patch from Cristian Almstrand <cristian.almstrand@gmail.com>.
2015-07-14 14:50:42 -07:00
Terry L. Lucas cec5812335 Fixed Dictionary and Event hookup w/o --gen-interop
TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1233083004 .
2015-07-14 14:18:48 -07:00
Terry L. Lucas 1fa61ee114 Fixed a few more things to make Dartium build w/o --gen-interop
TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1239653003 .
2015-07-14 07:17:59 -07:00
Terry L. Lucas 82fbd3382a Remove blink_jsObject when --gen-interop is not used.
TBR=vsm@google.com

Review URL: https://codereview.chromium.org//1236933003 .
2015-07-14 05:49:27 -07:00
Alan Knight 610edadff2 Revert "appendHtml, when sanitizing, should create document fragment in the right context"
This reverts commit 930a40daa5.

BUG=

Review URL: https://codereview.chromium.org//1230203005 .
2015-07-13 15:32:17 -07:00
Terry L. Lucas 045d9698d3 Revert "Turn on JS interop usage for DOM Dart libraries"
This reverts commit 7f6fc7eed2.
2015-07-13 13:40:42 -07:00
Terry L. Lucas 7f6fc7eed2 Turn on JS interop usage for DOM Dart libraries
Review URL: https://codereview.chromium.org//1235903003 .
2015-07-13 13:38:45 -07:00