mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-03 02:21:05 +08:00
None of the breaking changes listed in https://github.com/mochajs/mocha/releases/tag/v7.0.0 appear to be relevant for us. R=jacktfranklin@chromium.org DISABLE_THIRD_PARTY_CHECK=Update Mocha Bug: 1068145 Change-Id: I4aec1e775595a0cfcfaa307a8aad7fc9abad22ca Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2137392 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
26 lines
736 B
JavaScript
Generated
26 lines
736 B
JavaScript
Generated
'use strict';
|
|
|
|
var GetIntrinsic = require('../GetIntrinsic');
|
|
|
|
var $TypeError = GetIntrinsic('%TypeError%');
|
|
|
|
var CreateDataProperty = require('./CreateDataProperty');
|
|
var IsPropertyKey = require('./IsPropertyKey');
|
|
var Type = require('./Type');
|
|
|
|
// // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow
|
|
|
|
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
|
|
if (Type(O) !== 'Object') {
|
|
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
|
}
|
|
if (!IsPropertyKey(P)) {
|
|
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
|
|
}
|
|
var success = CreateDataProperty(O, P, V);
|
|
if (!success) {
|
|
throw new $TypeError('unable to create data property');
|
|
}
|
|
return success;
|
|
};
|