Add getObject and releaseObject to setBindData.

Former-commit-id: d4152ccc078bfa64d62640d89b673057cf9f6a19
This commit is contained in:
John-David Dalton
2013-07-26 19:35:01 -07:00
parent 036c2f6a1c
commit e94ca12f9f
7 changed files with 43 additions and 32 deletions

View File

@@ -323,7 +323,9 @@
'array': null,
'bottom': '',
'cache': null,
'configurable': false,
'criteria': null,
'enumerable': false,
'false': false,
'firstArg': '',
'index': 0,
@@ -344,7 +346,8 @@
'true': false,
'undefined': false,
'useHas': false,
'value': null
'value': null,
'writable': false
};
}
@@ -1550,12 +1553,10 @@
* @param {Mixed} value The value to set.
*/
var setBindData = !defineProperty ? noop : function(func, value) {
defineProperty(func, '__bindData__', {
'configurable': false,
'enumerable': false,
'value': value,
'writable': false
});
var descriptor = getObject();
descriptor.value = value;
defineProperty(func, '__bindData__', descriptor);
releaseObject(descriptor);
};
/**