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

Unified Diff: tools/dom/templates/html/dartium/html_dartium.darttemplate

Issue 1380603004: Revert "Preserve identity on wrap_jso hack. Has known failures" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index a7831cd343276e396045e23b1dfad759129b4f68..b15dab237afe597501927d563a74b151841e4748 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -394,17 +394,6 @@ wrap_jso(jsObject) {
// JS Interop converted the object to a Dart class e.g., Uint8ClampedList.
return jsObject;
}
-
- // To preserve identity, if we already have a wrapper for this, return it.
- var existing;
- if (jsObject is! js.JsArray) {
- var existing = jsObject['dartClass_instance'];
- try {
- if (unwrap_jso(existing) == jsObject) {
- return existing;
- }
- } catch(e) {}
- }
// Try the most general type conversions on it.
// TODO(alanknight): We may be able to do better. This maintains identity,
// which is useful, but expensive. And if we nest something that only
@@ -431,7 +420,6 @@ wrap_jso(jsObject) {
if (func != null) {
dartClass_instance = func();
dartClass_instance.blink_jsObject = jsObject;
- jsObject['dartClass_instance'] = dartClass_instance;
}
}
return dartClass_instance;
@@ -447,7 +435,6 @@ wrap_jso(jsObject) {
return null;
}
-
/**
* Create Dart class that maps to the JS Type that is the JS type being
* extended using JS interop createCallback (we need the base type of the
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698