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

Side by Side Diff: lib/runtime/dart/_isolate_helper.js

Issue 1752193002: Add a few more known non-null cases (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('dart/_isolate_helper', null, /* Imports */[ 1 dart_library.library('dart/_isolate_helper', null, /* Imports */[
2 'dart/_runtime', 2 'dart/_runtime',
3 'dart/core', 3 'dart/core',
4 'dart/_native_typed_data', 4 'dart/_native_typed_data',
5 'dart/_interceptors', 5 'dart/_interceptors',
6 'dart/_js_helper', 6 'dart/_js_helper',
7 'dart/isolate', 7 'dart/isolate',
8 'dart/_foreign_helper', 8 'dart/_foreign_helper',
9 'dart/_js_embedded_names', 9 'dart/_js_embedded_names',
10 'dart/collection', 10 'dart/collection',
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 dart.dsend(this[_scheduledControlEvents], 'addLast', dart.bind(this, 'kill ')); 614 dart.dsend(this[_scheduledControlEvents], 'addLast', dart.bind(this, 'kill '));
615 } 615 }
616 addErrorListener(port) { 616 addErrorListener(port) {
617 this.errorPorts.add(port); 617 this.errorPorts.add(port);
618 } 618 }
619 removeErrorListener(port) { 619 removeErrorListener(port) {
620 this.errorPorts.remove(port); 620 this.errorPorts.remove(port);
621 } 621 }
622 handleUncaughtError(error, stackTrace) { 622 handleUncaughtError(error, stackTrace) {
623 if (dart.notNull(this.errorPorts.isEmpty)) { 623 if (dart.notNull(this.errorPorts.isEmpty)) {
624 if (dart.notNull(this.errorsAreFatal) && dart.notNull(core.identical(thi s, exports._globalState.rootContext))) { 624 if (dart.notNull(this.errorsAreFatal) && core.identical(this, exports._g lobalState.rootContext)) {
625 return; 625 return;
626 } 626 }
627 if (self.console && self.console.error) { 627 if (self.console && self.console.error) {
628 self.console.error(error, stackTrace); 628 self.console.error(error, stackTrace);
629 } else { 629 } else {
630 core.print(error); 630 core.print(error);
631 if (stackTrace != null) core.print(stackTrace); 631 if (stackTrace != null) core.print(stackTrace);
632 } 632 }
633 return; 633 return;
634 } 634 }
635 let message = core.List.new(2); 635 let message = core.List.new(2);
636 message[dartx.set](0, dart.toString(error)); 636 message[dartx.set](0, dart.toString(error));
637 message[dartx.set](1, stackTrace == null ? null : dart.toString(stackTrace )); 637 message[dartx.set](1, stackTrace == null ? null : dart.toString(stackTrace ));
638 for (let port of this.errorPorts) 638 for (let port of this.errorPorts)
639 port.send(message); 639 port.send(message);
640 } 640 }
641 eval(code) { 641 eval(code) {
642 let old = exports._globalState.currentContext; 642 let old = exports._globalState.currentContext;
643 exports._globalState.currentContext = this; 643 exports._globalState.currentContext = this;
644 this[_setGlobals](); 644 this[_setGlobals]();
645 let result = null; 645 let result = null;
646 this[_isExecutingEvent] = true; 646 this[_isExecutingEvent] = true;
647 try { 647 try {
648 result = dart.dcall(code); 648 result = dart.dcall(code);
649 } catch (e) { 649 } catch (e) {
650 let s = dart.stackTrace(e); 650 let s = dart.stackTrace(e);
651 this.handleUncaughtError(e, s); 651 this.handleUncaughtError(e, s);
652 if (dart.notNull(this.errorsAreFatal)) { 652 if (dart.notNull(this.errorsAreFatal)) {
653 this.kill(); 653 this.kill();
654 if (dart.notNull(core.identical(this, exports._globalState.rootContext ))) { 654 if (core.identical(this, exports._globalState.rootContext)) {
655 throw e; 655 throw e;
656 } 656 }
657 } 657 }
658 } 658 }
659 finally { 659 finally {
660 this[_isExecutingEvent] = false; 660 this[_isExecutingEvent] = false;
661 exports._globalState.currentContext = old; 661 exports._globalState.currentContext = old;
662 if (old != null) old[_setGlobals](); 662 if (old != null) old[_setGlobals]();
663 if (this[_scheduledControlEvents] != null) { 663 if (this[_scheduledControlEvents] != null) {
664 while (dart.notNull(dart.as(dart.dload(this[_scheduledControlEvents], 'isNotEmpty'), core.bool))) { 664 while (dart.notNull(dart.as(dart.dload(this[_scheduledControlEvents], 'isNotEmpty'), core.bool))) {
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 hash = dart.notNull(hash) >> 0 ^ (dart.notNull(hash) / 4294967296)[dartx.t runcate](); 1480 hash = dart.notNull(hash) >> 0 ^ (dart.notNull(hash) / 4294967296)[dartx.t runcate]();
1481 hash = ~dart.notNull(hash) + (dart.notNull(hash) << 15) & 4294967295; 1481 hash = ~dart.notNull(hash) + (dart.notNull(hash) << 15) & 4294967295;
1482 hash = dart.notNull(hash) ^ dart.notNull(hash) >> 12; 1482 hash = dart.notNull(hash) ^ dart.notNull(hash) >> 12;
1483 hash = dart.notNull(hash) * 5 & 4294967295; 1483 hash = dart.notNull(hash) * 5 & 4294967295;
1484 hash = dart.notNull(hash) ^ dart.notNull(hash) >> 4; 1484 hash = dart.notNull(hash) ^ dart.notNull(hash) >> 4;
1485 hash = dart.notNull(hash) * 2057 & 4294967295; 1485 hash = dart.notNull(hash) * 2057 & 4294967295;
1486 hash = dart.notNull(hash) ^ dart.notNull(hash) >> 16; 1486 hash = dart.notNull(hash) ^ dart.notNull(hash) >> 16;
1487 return hash; 1487 return hash;
1488 } 1488 }
1489 ['=='](other) { 1489 ['=='](other) {
1490 if (dart.notNull(core.identical(other, this))) return true; 1490 if (core.identical(other, this)) return true;
1491 if (dart.is(other, CapabilityImpl)) { 1491 if (dart.is(other, CapabilityImpl)) {
1492 return core.identical(this[_id], other[_id]); 1492 return core.identical(this[_id], other[_id]);
1493 } 1493 }
1494 return false; 1494 return false;
1495 } 1495 }
1496 } 1496 }
1497 CapabilityImpl[dart.implements] = () => [isolate.Capability]; 1497 CapabilityImpl[dart.implements] = () => [isolate.Capability];
1498 dart.defineNamedConstructor(CapabilityImpl, '_internal'); 1498 dart.defineNamedConstructor(CapabilityImpl, '_internal');
1499 dart.setSignature(CapabilityImpl, { 1499 dart.setSignature(CapabilityImpl, {
1500 constructors: () => ({ 1500 constructors: () => ({
1501 CapabilityImpl: [CapabilityImpl, []], 1501 CapabilityImpl: [CapabilityImpl, []],
1502 _internal: [CapabilityImpl, [core.int]] 1502 _internal: [CapabilityImpl, [core.int]]
1503 }), 1503 }),
1504 methods: () => ({'==': [core.bool, [core.Object]]}) 1504 methods: () => ({'==': [core.bool, [core.Object]]})
1505 }); 1505 });
1506 // Exports: 1506 // Exports:
1507 exports.enterJsAsync = enterJsAsync; 1507 exports.enterJsAsync = enterJsAsync;
1508 exports.leaveJsAsync = leaveJsAsync; 1508 exports.leaveJsAsync = leaveJsAsync;
1509 exports.isWorker = isWorker; 1509 exports.isWorker = isWorker;
1510 exports.startRootIsolate = startRootIsolate; 1510 exports.startRootIsolate = startRootIsolate;
1511 exports.IsolateNatives = IsolateNatives; 1511 exports.IsolateNatives = IsolateNatives;
1512 exports.RawReceivePortImpl = RawReceivePortImpl; 1512 exports.RawReceivePortImpl = RawReceivePortImpl;
1513 exports.ReceivePortImpl = ReceivePortImpl; 1513 exports.ReceivePortImpl = ReceivePortImpl;
1514 exports.TimerImpl = TimerImpl; 1514 exports.TimerImpl = TimerImpl;
1515 exports.hasTimer = hasTimer; 1515 exports.hasTimer = hasTimer;
1516 exports.CapabilityImpl = CapabilityImpl; 1516 exports.CapabilityImpl = CapabilityImpl;
1517 }); 1517 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698