Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart

Issue 2698353003: unfork DDC's copy of most SDK libraries (Closed)
Patch Set: revert core_patch Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
index 93f19fb8777f45eca55b92aa5ed64be0bb0498a5..4cefe98820cdd4dc8bd15be1b1d44265ec526b43 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
@@ -8,7 +8,7 @@ import 'dart:_js_helper' show patch, ForceInline;
import 'dart:_foreign_helper' show JS;
@patch
-// @ForceInline()
+@ForceInline()
bool debugger({bool when: true, String message}) {
if (when) {
JS('', 'debugger');
@@ -46,7 +46,7 @@ _registerExtension(String method, ServiceExtensionHandler handler) {
}
@patch
-_postEvent(String eventKind, String eventData) {
+void _postEvent(String eventKind, String eventData) {
// TODO.
}
@@ -117,11 +117,63 @@ int _getServiceMinorVersion() {
}
@patch
-void _getServerInfo(SendPort sp) {
- sp.send(null);
+void _getServerInfo(SendPort sendPort) {
+ sendPort.send(null);
}
@patch
-void _webServerControl(SendPort sp, bool enable) {
- sp.send(null);
+void _webServerControl(SendPort sendPort, bool enable) {
+ sendPort.send(null);
}
+
+@patch
+String _getIsolateIDFromSendPort(SendPort sendPort) {
+ return null;
+}
+
+@patch
+class UserTag {
+ @patch
+ factory UserTag(String label) = _FakeUserTag;
+
+ @patch
+ static UserTag get defaultTag => _FakeUserTag._defaultTag;
+}
+
+class _FakeUserTag implements UserTag {
+ static Map _instances = {};
+
+ _FakeUserTag.real(this.label);
+
+ factory _FakeUserTag(String label) {
+ // Canonicalize by name.
+ var existingTag = _instances[label];
+ if (existingTag != null) {
+ return existingTag;
+ }
+ // Throw an exception if we've reached the maximum number of user tags.
+ if (_instances.length == UserTag.MAX_USER_TAGS) {
+ throw new UnsupportedError(
+ 'UserTag instance limit (${UserTag.MAX_USER_TAGS}) reached.');
+ }
+ // Create a new instance and add it to the instance map.
+ var instance = new _FakeUserTag.real(label);
+ _instances[label] = instance;
+ return instance;
+ }
+
+ final String label;
+
+ UserTag makeCurrent() {
+ var old = _currentTag;
+ _currentTag = this;
+ return old;
+ }
+
+ static final UserTag _defaultTag = new _FakeUserTag('Default');
+}
+
+var _currentTag = _FakeUserTag._defaultTag;
+
+@patch
+UserTag getCurrentTag() => _currentTag;
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart ('k') | pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698