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

Side by Side Diff: runtime/bin/builtin.dart

Issue 1505193003: Standalone: Null out _packagesPort after close. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library builtin; 5 library builtin;
6 // NOTE: Do not import 'dart:io' in builtin. 6 // NOTE: Do not import 'dart:io' in builtin.
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:_internal'; 9 import 'dart:_internal';
10 import 'dart:isolate'; 10 import 'dart:isolate';
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 "${_pendingPackageLoads.length} packages pending."); 389 "${_pendingPackageLoads.length} packages pending.");
390 } 390 }
391 } 391 }
392 392
393 393
394 RawReceivePort _packagesPort; 394 RawReceivePort _packagesPort;
395 395
396 void _handlePackagesReply(msg) { 396 void _handlePackagesReply(msg) {
397 // Make sure to close the _packagePort before any other action. 397 // Make sure to close the _packagePort before any other action.
398 _packagesPort.close(); 398 _packagesPort.close();
399 _packagesPort = null;
399 400
400 if (_traceLoading) { 401 if (_traceLoading) {
401 _log("Got packages reply: $msg"); 402 _log("Got packages reply: $msg");
402 } 403 }
403 if (msg is String) { 404 if (msg is String) {
404 if (_traceLoading) { 405 if (_traceLoading) {
405 _log("Got failure response on package port: '$msg'"); 406 _log("Got failure response on package port: '$msg'");
406 } 407 }
407 throw msg; 408 throw msg;
408 } 409 }
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 } 828 }
828 829
829 830
830 // Register callbacks and hooks with the rest of the core libraries. 831 // Register callbacks and hooks with the rest of the core libraries.
831 _setupHooks() { 832 _setupHooks() {
832 _setupCompleted = true; 833 _setupCompleted = true;
833 VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes; 834 VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes;
834 VMLibraryHooks.getPackageRoot = _getPackageRoot; 835 VMLibraryHooks.getPackageRoot = _getPackageRoot;
835 VMLibraryHooks.getPackageMap = _getPackageMap; 836 VMLibraryHooks.getPackageMap = _getPackageMap;
836 } 837 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698