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

Unified Diff: client/html/src/DOMWrapperBase.dart

Issue 8416010: Further code review changes for issue 8341027. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 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 | « no previous file | client/html/src/DocumentFragmentWrappingImplementation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/src/DOMWrapperBase.dart
diff --git a/client/html/src/DOMWrapperBase.dart b/client/html/src/DOMWrapperBase.dart
index c25786327b874acf736f809e154245ef4c883cb2..78338b04913562179a823fdea6f0a2aa637ff373 100644
--- a/client/html/src/DOMWrapperBase.dart
+++ b/client/html/src/DOMWrapperBase.dart
@@ -6,9 +6,10 @@ class DOMWrapperBase {
final _ptr;
DOMWrapperBase._wrap(this._ptr) {
- // We should never be creating duplicate wrappers.
- assert(_ptr.dartObjectLocalStorage === null);
- _ptr.dartObjectLocalStorage = this;
+ if (this._ptr == null) return;
+ // We should never be creating duplicate wrappers.
Jacob 2011/10/27 21:01:27 because this is on the hot path for every time any
nweiz 2011/10/27 21:20:35 Done.
+ assert(_ptr.dartObjectLocalStorage === null);
+ _ptr.dartObjectLocalStorage = this;
}
}
« no previous file with comments | « no previous file | client/html/src/DocumentFragmentWrappingImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698