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

Unified Diff: dart/sdk/lib/js/dart2js/js_dart2js.dart

Issue 125033003: Version 1.1.0-dev.5.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_rti.dart ('k') | dart/tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/js/dart2js/js_dart2js.dart
===================================================================
--- dart/sdk/lib/js/dart2js/js_dart2js.dart (revision 31466)
+++ dart/sdk/lib/js/dart2js/js_dart2js.dart (working copy)
@@ -544,7 +544,14 @@
Object _getDartProxy(o, String propertyName, createProxy(o)) {
var dartProxy = JS('', '#[#]', o, propertyName);
- if (dartProxy == null) {
+ // Temporary fix for dartbug.com/15193
+ // In some cases it's possible to see a JavaScript object that
+ // came from a different context and was previously proxied to
+ // Dart in that context. The JS object will have a cached proxy
+ // but it won't be a valid Dart object in this context.
+ // For now we throw away the cached proxy, but we should be able
+ // to cache proxies from multiple JS contexts and Dart isolates.
+ if (dartProxy == null || !_isLocalObject(o)) {
dartProxy = createProxy(o);
_defineProperty(o, propertyName, dartProxy);
}
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_rti.dart ('k') | dart/tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698