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

Unified Diff: frog/minfrog

Issue 8999030: frog isolate fixes: minor changes to the isolate library + architecture.py (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 years 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
« no previous file with comments | « frog/lib/isolate.dart ('k') | frog/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/minfrog
diff --git a/frog/minfrog b/frog/minfrog
index e25a11b7813cd766dba1c472f668de06a8ac5e17..21e74a677fd166d566c94c0760bd65892ab24623 100755
--- a/frog/minfrog
+++ b/frog/minfrog
@@ -1813,6 +1813,7 @@ Collections.filter = function(source, destination, f) {
}
return destination;
}
+// ********** Code for _Worker **************
// ********** Code for top level **************
// ********** Library node **************
// ********** Code for Process **************
@@ -1880,7 +1881,11 @@ Object.prototype.$typeNameOf = function() {
}
var str = Object.prototype.toString.call(this);
str = str.substring(8, str.length - 1);
- if (str == 'Window') str = 'DOMWindow';
+ if (str == 'Window') {
+ str = 'DOMWindow';
+ } else if (str == 'Document') {
+ str = 'HTMLDocument';
+ }
return str;
}
function $dynamic(name) {
@@ -2124,7 +2129,7 @@ CoreJs.prototype.ensureDynamicProto = function() {
CoreJs.prototype.ensureTypeNameOf = function() {
if (this._generatedTypeNameOf) return;
this._generatedTypeNameOf = true;
- this.writer.writeln("Object.prototype.$typeNameOf = function() {\n if ((typeof(window) != 'undefined' && window.constructor.name == 'DOMWindow')\n || typeof(process) != 'undefined') { // fast-path for Chrome and Node\n return this.constructor.name;\n }\n var str = Object.prototype.toString.call(this);\n str = str.substring(8, str.length - 1);\n if (str == 'Window') str = 'DOMWindow';\n return str;\n}"/*null._TYPE_NAME_OF_FUNCTION*/);
+ this.writer.writeln("Object.prototype.$typeNameOf = function() {\n if ((typeof(window) != 'undefined' && window.constructor.name == 'DOMWindow')\n || typeof(process) != 'undefined') { // fast-path for Chrome and Node\n return this.constructor.name;\n }\n var str = Object.prototype.toString.call(this);\n str = str.substring(8, str.length - 1);\n if (str == 'Window') {\n str = 'DOMWindow';\n } else if (str == 'Document') {\n str = 'HTMLDocument';\n }\n return str;\n}"/*null._TYPE_NAME_OF_FUNCTION*/);
}
CoreJs.prototype.ensureInheritsHelper = function() {
if (this._generatedInherits) return;
@@ -12813,7 +12818,13 @@ World.prototype._addJavascriptTopName = function(named, name) {
this._renameJavascriptTopName(existing);
}
else {
- $globals.world.internalError(('conflicting JS name "' + name + '" of same ') + ('priority ' + existingPri + ': (already defined in) ') + ('' + existing.get$span().get$locationText() + ' with priority ' + namedPri + ')'), named.get$span(), existing.get$span());
+ var msg = ('conflicting JS name "' + name + '" of same ') + ('priority ' + existingPri + ': (already defined in) ') + ('' + existing.get$span().get$locationText() + ' with priority ' + namedPri + ')');
+ if (named.get$isNative()) {
+ $globals.world.info(msg, named.get$span(), existing.get$span());
+ }
+ else {
+ $globals.world.internalError(msg, named.get$span(), existing.get$span());
+ }
}
}
else {
« no previous file with comments | « frog/lib/isolate.dart ('k') | frog/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698