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

Unified Diff: test/intl/utils.js

Issue 148883002: Synchronize with r15594. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « test/intl/testcfg.py ('k') | test/mjsunit/allocation-site-info.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/intl/utils.js
diff --git a/src/extensions/i18n/header.js b/test/intl/utils.js
similarity index 80%
copy from src/extensions/i18n/header.js
copy to test/intl/utils.js
index 1c0a2d8874b5aa982ca2be2fb39f2ead1c4a9622..917359077d479bde63e8911af1ce55797819e958 100644
--- a/src/extensions/i18n/header.js
+++ b/test/intl/utils.js
@@ -24,18 +24,17 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// limitations under the License.
-
-// ECMAScript 402 API implementation is broken into separate files for
-// each service. The build system combines them together into one
-// Intl namespace.
/**
- * Intl object is a single object that has some named properties,
- * all of which are constructors.
+ * Taints properties on Object.prototype so we can find security issues.
*/
-var Intl = (function() {
-
-'use strict';
-
-var Intl = {};
+function taintProperties(properties) {
+ properties.forEach(function(property) {
+ Object.defineProperty(Object.prototype, property, {
+ set: function(value) {
+ throw new Error('Property ' + property + ' is compromised. ' +
+ 'Setting value: ' + value);
+ }
+ });
+ });
+}
« no previous file with comments | « test/intl/testcfg.py ('k') | test/mjsunit/allocation-site-info.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698