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

Side by Side Diff: frog/minfrog

Issue 9918014: Fix issue http://dartbug.com/2342 by checking document.readyState (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/gen.dart ('k') | lib/compiler/implementation/emitter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env node 1 #!/usr/bin/env node
2 // ********** Library dart:core ************** 2 // ********** Library dart:core **************
3 // ********** Natives dart:core ************** 3 // ********** Natives dart:core **************
4 function $defProp(obj, prop, value) { 4 function $defProp(obj, prop, value) {
5 Object.defineProperty(obj, prop, 5 Object.defineProperty(obj, prop,
6 {value: value, enumerable: false, writable: true, configurable: true}); 6 {value: value, enumerable: false, writable: true, configurable: true});
7 } 7 }
8 Function.prototype.bind = Function.prototype.bind || 8 Function.prototype.bind = Function.prototype.bind ||
9 function(thisObj) { 9 function(thisObj) {
10 var func = this; 10 var func = this;
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 this.clear(); 1603 this.clear();
1604 this.add(content); 1604 this.add(content);
1605 } 1605 }
1606 StringBufferImpl.prototype.get$length = function() { 1606 StringBufferImpl.prototype.get$length = function() {
1607 return this._length; 1607 return this._length;
1608 } 1608 }
1609 StringBufferImpl.prototype.isEmpty = function() { 1609 StringBufferImpl.prototype.isEmpty = function() {
1610 return this._length == (0); 1610 return this._length == (0);
1611 } 1611 }
1612 StringBufferImpl.prototype.add = function(obj) { 1612 StringBufferImpl.prototype.add = function(obj) {
1613 var str = obj.toString$0(); 1613 var str = obj.toString();
1614 if (null == str || str.isEmpty()) return this; 1614 if (null == str || str.isEmpty()) return this;
1615 this._buffer.add(str); 1615 this._buffer.add(str);
1616 this._length = this._length + str.length; 1616 this._length = this._length + str.length;
1617 return this; 1617 return this;
1618 } 1618 }
1619 StringBufferImpl.prototype.addAll = function(objects) { 1619 StringBufferImpl.prototype.addAll = function(objects) {
1620 for (var $$i = objects.iterator(); $$i.hasNext(); ) { 1620 for (var $$i = objects.iterator(); $$i.hasNext(); ) {
1621 var obj = $$i.next(); 1621 var obj = $$i.next();
1622 this.add(obj); 1622 this.add(obj);
1623 } 1623 }
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after
3393 var isolateMain = $globals.world.isolatelib.lookup("startRootIsolate", this. main.get$span()); 3393 var isolateMain = $globals.world.isolatelib.lookup("startRootIsolate", this. main.get$span());
3394 mainCall = isolateMain.invoke(this.mainContext, null, new TypeValue($globals .world.isolatelib.topType, this.main.get$span()), new Arguments(null, [this.main ._get(this.mainContext, this.main.definition, null)])); 3394 mainCall = isolateMain.invoke(this.mainContext, null, new TypeValue($globals .world.isolatelib.topType, this.main.get$span()), new Arguments(null, [this.main ._get(this.mainContext, this.main.definition, null)]));
3395 } 3395 }
3396 this.typeEmittedTests = new HashMapImplementation_Type$Map_dart_core_String$bo ol(); 3396 this.typeEmittedTests = new HashMapImplementation_Type$Map_dart_core_String$bo ol();
3397 this.writeTypes($globals.world.coreimpl); 3397 this.writeTypes($globals.world.coreimpl);
3398 this.writeTypes($globals.world.corelib); 3398 this.writeTypes($globals.world.corelib);
3399 this.writeTypes(this.main.declaringType.get$library()); 3399 this.writeTypes(this.main.declaringType.get$library());
3400 if (this._mixins != null) this.writer.write(this._mixins.get$text()); 3400 if (this._mixins != null) this.writer.write(this._mixins.get$text());
3401 this.writeDynamicDispatchMetadata(); 3401 this.writeDynamicDispatchMetadata();
3402 this.writeGlobals(); 3402 this.writeGlobals();
3403 this.writer.writeln("if (typeof window != 'undefined' && window.addEventListen er) {"); 3403 this.writer.writeln("if (typeof window != 'undefined' && typeof document != 'u ndefined' &&");
3404 this.writer.writeln(" window.addEventListener && document.readyState == 'lo ading') {");
3404 this.writer.writeln(" window.addEventListener('DOMContentLoaded', function(e) {"); 3405 this.writer.writeln(" window.addEventListener('DOMContentLoaded', function(e) {");
3405 this.writer.writeln((" " + mainCall.get$code() + ";")); 3406 this.writer.writeln((" " + mainCall.get$code() + ";"));
3406 this.writer.writeln(" });"); 3407 this.writer.writeln(" });");
3407 this.writer.writeln("} else {"); 3408 this.writer.writeln("} else {");
3408 this.writer.writeln((" " + mainCall.get$code() + ";")); 3409 this.writer.writeln((" " + mainCall.get$code() + ";"));
3409 this.writer.writeln("}"); 3410 this.writer.writeln("}");
3410 } 3411 }
3411 WorldGenerator.prototype.markLibrariesUsed = function(libs) { 3412 WorldGenerator.prototype.markLibrariesUsed = function(libs) {
3412 return this.getAllTypes(libs).forEach(this.get$markTypeUsed()); 3413 return this.getAllTypes(libs).forEach(this.get$markTypeUsed());
3413 } 3414 }
(...skipping 11693 matching lines...) Expand 10 before | Expand all | Expand 10 after
15107 var const$0002 = Object.create(EmptyQueueException.prototype, {}); 15108 var const$0002 = Object.create(EmptyQueueException.prototype, {});
15108 var const$0006 = Object.create(IllegalAccessException.prototype, {}); 15109 var const$0006 = Object.create(IllegalAccessException.prototype, {});
15109 var const$0007 = ImmutableList.ImmutableList$from$factory([]); 15110 var const$0007 = ImmutableList.ImmutableList$from$factory([]);
15110 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/"); 15111 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/");
15111 var const$0010 = ImmutableList.ImmutableList$from$factory(["__PROTO__", "prototy pe", "constructor"]); 15112 var const$0010 = ImmutableList.ImmutableList$from$factory(["__PROTO__", "prototy pe", "constructor"]);
15112 var const$0011 = ImmutableList.ImmutableList$from$factory(["NaN", "Infinity", "u ndefined", "eval", "parseInt", "parseFloat", "isNan", "isFinite", "decodeURI", " decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "A rray", "String", "Boolean", "Number", "Date", "RegExp", "Error", "EvalError", "R angeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "a rguments", "escape", "unescape", "applicationCache", "closed", "Components", "co ntent", "controllers", "crypto", "defaultStatus", "dialogArguments", "directorie s", "document", "frameElement", "frames", "fullScreen", "globalStorage", "histor y", "innerHeight", "innerWidth", "length", "location", "locationbar", "localStor age", "menubar", "mozInnerScreenX", "mozInnerScreenY", "mozScreenPixelsPerCssPix el", "name", "navigator", "opener", "outerHeight", "outerWidth", "pageXOffset", "pageYOffset", "parent", "personalbar", "pkcs11", "returnValue", "screen", "scro llbars", "scrollMaxX", "scrollMaxY", "self", "sessionStorage", "sidebar", "statu s", "statusbar", "toolbar", "top", "window", "alert", "addEventListener", "atob" , "back", "blur", "btoa", "captureEvents", "clearInterval", "clearTimeout", "clo se", "confirm", "disableExternalCapture", "dispatchEvent", "dump", "enableExtern alCapture", "escape", "find", "focus", "forward", "GeckoActiveXObject", "getAtte ntion", "getAttentionWithCycleCount", "getComputedStyle", "getSelection", "home" , "maximize", "minimize", "moveBy", "moveTo", "open", "openDialog", "postMessage ", "print", "prompt", "QueryInterface", "releaseEvents", "removeEventListener", "resizeBy", "resizeTo", "restore", "routeEvent", "scroll", "scrollBy", "scrollBy Lines", "scrollByPages", "scrollTo", "setInterval", "setResizeable", "setTimeout ", "showModalDialog", "sizeToContent", "stop", "uuescape", "updateCommands", "XP CNativeWrapper", "XPCSafeJSOjbectWrapper", "onabort", "onbeforeunload", "onchang e", "onclick", "onclose", "oncontextmenu", "ondragdrop", "onerror", "onfocus", " onhashchange", "onkeydown", "onkeypress", "onkeyup", "onload", "onmousedown", "o nmousemove", "onmouseout", "onmouseover", "onmouseup", "onmozorientation", "onpa int", "onreset", "onresize", "onscroll", "onselect", "onsubmit", "onunload", "on touchcancel", "ontouchend", "ontouchmove", "ontouchstart", "ongesturestart", "on gesturechange", "ongestureend", "uneval", "getPrototypeOf", "let", "yield", "abs tract", "int", "short", "boolean", "interface", "static", "byte", "long", "char" , "final", "native", "synchronized", "float", "package", "throws", "goto", "priv ate", "transient", "implements", "protected", "volatile", "double", "public", "a ttachEvent", "clientInformation", "clipboardData", "createPopup", "dialogHeight" , "dialogLeft", "dialogTop", "dialogWidth", "onafterprint", "onbeforedeactivate" , "onbeforeprint", "oncontrolselect", "ondeactivate", "onhelp", "onresizeend", " event", "external", "Debug", "Enumerator", "Global", "Image", "ActiveXObject", " VBArray", "Components", "toString", "getClass", "constructor", "prototype", "val ueOf", "Anchor", "Applet", "Attr", "Canvas", "CanvasGradient", "CanvasPattern", "CanvasRenderingContext2D", "CDATASection", "CharacterData", "Comment", "CSS2Pro perties", "CSSRule", "CSSStyleSheet", "Document", "DocumentFragment", "DocumentT ype", "DOMException", "DOMImplementation", "DOMParser", "Element", "Event", "Ext ernalInterface", "FlashPlayer", "Form", "Frame", "History", "HTMLCollection", "H TMLDocument", "HTMLElement", "IFrame", "Image", "Input", "JSObject", "KeyEvent", "Link", "Location", "MimeType", "MouseEvent", "Navigator", "Node", "NodeList", "Option", "Plugin", "ProcessingInstruction", "Range", "RangeException", "Screen" , "Select", "Table", "TableCell", "TableRow", "TableSelection", "Text", "TextAre a", "UIEvent", "Window", "XMLHttpRequest", "XMLSerializer", "XPathException", "X PathResult", "XSLTProcessor", "java", "Packages", "netscape", "sun", "JavaObject ", "JavaClass", "JavaArray", "JavaMember", "$wnd", "$doc", "$entry", "$moduleNam e", "$moduleBase", "$gwt_version", "$sessionId", "$stack", "$stackDepth", "$loca tion", "call"]); 15113 var const$0011 = ImmutableList.ImmutableList$from$factory(["NaN", "Infinity", "u ndefined", "eval", "parseInt", "parseFloat", "isNan", "isFinite", "decodeURI", " decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "A rray", "String", "Boolean", "Number", "Date", "RegExp", "Error", "EvalError", "R angeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "a rguments", "escape", "unescape", "applicationCache", "closed", "Components", "co ntent", "controllers", "crypto", "defaultStatus", "dialogArguments", "directorie s", "document", "frameElement", "frames", "fullScreen", "globalStorage", "histor y", "innerHeight", "innerWidth", "length", "location", "locationbar", "localStor age", "menubar", "mozInnerScreenX", "mozInnerScreenY", "mozScreenPixelsPerCssPix el", "name", "navigator", "opener", "outerHeight", "outerWidth", "pageXOffset", "pageYOffset", "parent", "personalbar", "pkcs11", "returnValue", "screen", "scro llbars", "scrollMaxX", "scrollMaxY", "self", "sessionStorage", "sidebar", "statu s", "statusbar", "toolbar", "top", "window", "alert", "addEventListener", "atob" , "back", "blur", "btoa", "captureEvents", "clearInterval", "clearTimeout", "clo se", "confirm", "disableExternalCapture", "dispatchEvent", "dump", "enableExtern alCapture", "escape", "find", "focus", "forward", "GeckoActiveXObject", "getAtte ntion", "getAttentionWithCycleCount", "getComputedStyle", "getSelection", "home" , "maximize", "minimize", "moveBy", "moveTo", "open", "openDialog", "postMessage ", "print", "prompt", "QueryInterface", "releaseEvents", "removeEventListener", "resizeBy", "resizeTo", "restore", "routeEvent", "scroll", "scrollBy", "scrollBy Lines", "scrollByPages", "scrollTo", "setInterval", "setResizeable", "setTimeout ", "showModalDialog", "sizeToContent", "stop", "uuescape", "updateCommands", "XP CNativeWrapper", "XPCSafeJSOjbectWrapper", "onabort", "onbeforeunload", "onchang e", "onclick", "onclose", "oncontextmenu", "ondragdrop", "onerror", "onfocus", " onhashchange", "onkeydown", "onkeypress", "onkeyup", "onload", "onmousedown", "o nmousemove", "onmouseout", "onmouseover", "onmouseup", "onmozorientation", "onpa int", "onreset", "onresize", "onscroll", "onselect", "onsubmit", "onunload", "on touchcancel", "ontouchend", "ontouchmove", "ontouchstart", "ongesturestart", "on gesturechange", "ongestureend", "uneval", "getPrototypeOf", "let", "yield", "abs tract", "int", "short", "boolean", "interface", "static", "byte", "long", "char" , "final", "native", "synchronized", "float", "package", "throws", "goto", "priv ate", "transient", "implements", "protected", "volatile", "double", "public", "a ttachEvent", "clientInformation", "clipboardData", "createPopup", "dialogHeight" , "dialogLeft", "dialogTop", "dialogWidth", "onafterprint", "onbeforedeactivate" , "onbeforeprint", "oncontrolselect", "ondeactivate", "onhelp", "onresizeend", " event", "external", "Debug", "Enumerator", "Global", "Image", "ActiveXObject", " VBArray", "Components", "toString", "getClass", "constructor", "prototype", "val ueOf", "Anchor", "Applet", "Attr", "Canvas", "CanvasGradient", "CanvasPattern", "CanvasRenderingContext2D", "CDATASection", "CharacterData", "Comment", "CSS2Pro perties", "CSSRule", "CSSStyleSheet", "Document", "DocumentFragment", "DocumentT ype", "DOMException", "DOMImplementation", "DOMParser", "Element", "Event", "Ext ernalInterface", "FlashPlayer", "Form", "Frame", "History", "HTMLCollection", "H TMLDocument", "HTMLElement", "IFrame", "Image", "Input", "JSObject", "KeyEvent", "Link", "Location", "MimeType", "MouseEvent", "Navigator", "Node", "NodeList", "Option", "Plugin", "ProcessingInstruction", "Range", "RangeException", "Screen" , "Select", "Table", "TableCell", "TableRow", "TableSelection", "Text", "TextAre a", "UIEvent", "Window", "XMLHttpRequest", "XMLSerializer", "XPathException", "X PathResult", "XSLTProcessor", "java", "Packages", "netscape", "sun", "JavaObject ", "JavaClass", "JavaArray", "JavaMember", "$wnd", "$doc", "$entry", "$moduleNam e", "$moduleBase", "$gwt_version", "$sessionId", "$stack", "$stackDepth", "$loca tion", "call"]);
15113 var const$0012 = ImmutableList.ImmutableList$from$factory(["break", "delete", "f unction", "return", "typeof", "case", "do", "if", "switch", "var", "catch", "els e", "in", "this", "void", "continue", "false", "instanceof", "throw", "while", " debugger", "finally", "new", "true", "with", "default", "for", "null", "try", "a bstract", "double", "goto", "native", "static", "boolean", "enum", "implements", "package", "super", "byte", "export", "import", "private", "synchronized", "cha r", "extends", "int", "protected", "throws", "class", "final", "interface", "pub lic", "transient", "const", "float", "long", "short", "volatile"]); 15114 var const$0012 = ImmutableList.ImmutableList$from$factory(["break", "delete", "f unction", "return", "typeof", "case", "do", "if", "switch", "var", "catch", "els e", "in", "this", "void", "continue", "false", "instanceof", "throw", "while", " debugger", "finally", "new", "true", "with", "default", "for", "null", "try", "a bstract", "double", "goto", "native", "static", "boolean", "enum", "implements", "package", "super", "byte", "export", "import", "private", "synchronized", "cha r", "extends", "int", "protected", "throws", "class", "final", "interface", "pub lic", "transient", "const", "float", "long", "short", "volatile"]);
15114 var const$0013 = new JSSyntaxRegExp("^[a-zA-Z][a-zA-Z_$0-9]*$"); 15115 var const$0013 = new JSSyntaxRegExp("^[a-zA-Z][a-zA-Z_$0-9]*$");
15115 var $globals = {}; 15116 var $globals = {};
15116 $static_init(); 15117 $static_init();
15117 if (typeof window != 'undefined' && window.addEventListener) { 15118 if (typeof window != 'undefined' && typeof document != 'undefined' &&
15119 window.addEventListener && document.readyState == 'loading') {
15118 window.addEventListener('DOMContentLoaded', function(e) { 15120 window.addEventListener('DOMContentLoaded', function(e) {
15119 main(); 15121 main();
15120 }); 15122 });
15121 } else { 15123 } else {
15122 main(); 15124 main();
15123 } 15125 }
OLDNEW
« no previous file with comments | « frog/gen.dart ('k') | lib/compiler/implementation/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698