157b35983a
BUG= TEST= Review URL: http://codereview.chromium.org//8363040 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1050 260f80e4-7a28-3924-810f-c04153c831b5
18 lines
565 B
Dart
18 lines
565 B
Dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
class DOMWrapperBase {
|
|
final _ptr;
|
|
|
|
DOMWrapperBase._wrap(this._ptr) {
|
|
// We should never be creating duplicate wrappers.
|
|
assert(_ptr.dartObjectLocalStorage === null);
|
|
_ptr.dartObjectLocalStorage = this;
|
|
}
|
|
}
|
|
|
|
/** This function is provided for unittest purposes only. */
|
|
unwrapDomObject(DOMWrapperBase wrapper) {
|
|
return wrapper._ptr;
|
|
} |