Chromium Code Reviews| Index: sdk/lib/js/dartium/js_dartium.dart |
| diff --git a/sdk/lib/js/dartium/js_dartium.dart b/sdk/lib/js/dartium/js_dartium.dart |
| index 2ec2c0e5e79010f9e3e87cf3874be63bf1536e1b..a0c48ea0d93ed32372e0262d46effebb8c054aef 100644 |
| --- a/sdk/lib/js/dartium/js_dartium.dart |
| +++ b/sdk/lib/js/dartium/js_dartium.dart |
| @@ -76,15 +76,21 @@ SendPortSync _jsPortInstanceof = window.lookupPort('dart-js-instanceof'); |
| SendPortSync _jsPortDeleteProperty = window.lookupPort('dart-js-delete-property'); |
| SendPortSync _jsPortConvert = window.lookupPort('dart-js-convert'); |
| + |
|
ahe
2013/10/02 10:19:55
Extra line.
|
| +JsObject _context; |
| + |
| /** |
| * Returns a proxy to the global JavaScript context for this page. |
| */ |
| JsObject get context { |
| - var port = _jsPortSync; |
| - if (port == null) { |
| - return null; |
| + if (_context == null) { |
| + var port = _jsPortSync; |
| + if (port == null) { |
| + return null; |
| + } |
| + _context = _deserialize(_jsPortSync.callSync([])); |
| } |
| - return _deserialize(_jsPortSync.callSync([])); |
| + return _context; |
| } |
| /** |