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.
- 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 .
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 .
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.
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.
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#23845R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//1234163002 .
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>.