Version 0.5.7.2 .
svn merge -c 22598 https://dart.googlecode.com/svn/branches/bleeding_edge/dart dart
Review URL: https://codereview.chromium.org//14690017
git-svn-id: http://dart.googlecode.com/svn/trunk@22611 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart b/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
index 5d87979..4f2b76d 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
@@ -15,6 +15,7 @@
checkNull,
checkNum,
checkString,
+ defineProperty,
getRuntimeType,
regExpGetNative,
stringContainsUnchecked,
@@ -43,34 +44,27 @@
/**
* The name of the property used on native classes and `Object.prototype` to get
* the interceptor for a native class instance. The value is initialized on
- * isolate startup.
+ * isolate startup to ensure no two Dart programs in the same page use the same
+ * property.
*/
var dispatchPropertyName = null;
getDispatchProperty(object) {
- // TODO(sra): Implement the magic.
// This is a magic method: the compiler replaces it with a runtime generated
// function
//
// function(object){return object._zzyzx;}
//
- // where _zzyzx is replaced with the actual [dispatchPropertyName].
+ // where `_zzyzx` is replaced with the actual [dispatchPropertyName].
//
- // The body is the CSP compliant version.
+ // The CSP compliant version replaces this function with one of a few
+ // pre-compiled accessors, unless the pre-compiled versions are all in use,
+ // when it falls back on this code.
return JS('', '#[#]', object, dispatchPropertyName);
}
setDispatchProperty(object, value) {
- // TODO(sra): Implement the magic.
- // This is a magic method: the compiler replaces it with a runtime generated
- // function
- //
- // function(object, value){object._zzyzx = value;}
- //
- // where _zzyzx is replaced with the actual [dispatchPropertyName].
- //
- // The body is the CSP compliant version.
- JS('void', '#[#] = #', object, dispatchPropertyName, value);
+ defineProperty(object, dispatchPropertyName, value);
}
makeDispatchRecord(interceptor, proto, extension) {
diff --git a/tools/VERSION b/tools/VERSION
index 9c1bb6f..9a01402 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
MAJOR 0
MINOR 5
BUILD 7
-PATCH 1
+PATCH 2